diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 0000000..53f834e --- /dev/null +++ b/.github/workflows/action.yaml @@ -0,0 +1,20 @@ +name: Test actions/setup + +on: + push: + paths: + - actions/** + +jobs: + run: + runs-on: ubuntu-latest + permissions: + packages: read + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Setup scout + uses: ./actions/setup + with: + token: ${{ secrets.GITHUB_TOKEN }} + - run: scout --version diff --git a/actions/setup/README.md b/actions/setup/README.md new file mode 100644 index 0000000..62b8d53 --- /dev/null +++ b/actions/setup/README.md @@ -0,0 +1,9 @@ +# Scout Setup Action + +This is a GitHub Workflow Action to setup @glasskube/scout. + +## Inputs + +- `token` (required): The GitHub Token used to authenticate against the GitHub package registry. + You can use ${{ secrets.GITHUB_TOKEN }} or a custom personal access token. + It needs permission to read public packages from the GitHub package registry. diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml new file mode 100644 index 0000000..d617b11 --- /dev/null +++ b/actions/setup/action.yaml @@ -0,0 +1,21 @@ +name: Setup @glasskube/scout +description: Install @glasskube/scout globally using npm +inputs: + token: + required: true + description: GitHub Token for NPM registry +outputs: {} +runs: + using: "composite" + steps: + - name: Setup node.js + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 + with: + node-version: "20" + registry-url: "https://npm.pkg.github.com" + scope: "@glasskube" + - name: Install scout + shell: sh + run: npm install --global @glasskube/scout@0.1.0 # x-release-please-version + env: + NODE_AUTH_TOKEN: ${{ inputs.token }} diff --git a/release-please-config.json b/release-please-config.json index e77d812..fb6ec6e 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,8 +8,11 @@ "bump-patch-for-minor-pre-major": true, "draft": false, "prerelease": false, - "include-component-in-tag": false + "include-component-in-tag": false, + "extra-files": [ + "actions/setup/action.yaml" + ] } }, "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" -} \ No newline at end of file +}