From 4678ffb3c61dfa4790cd690871a809c3dd7d8b53 Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Wed, 1 Nov 2023 03:47:42 +0100 Subject: [PATCH 1/6] Initial commit. --- action.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index e5e4db6..591dbd9 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: 'central-login' -description: A GitHub Action to configure login credentials for an ACS Central instance for use in subsequent steps +description: A GitHub Action to configure login credentials for a RHACS Central instance for use in subsequent steps inputs: endpoint: required: true diff --git a/package.json b/package.json index 39346e6..0cb1b55 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "central-login", "version": "1.0.0", - "description": "A GitHub Action to configure login credentials for an ACS Central instance", + "description": "A GitHub Action to configure login credentials for a RHACS Central instance", "main": "src/main.ts", "scripts": { "build": "tsc", From 1bd06097f069b5981180ed06a71b0916534a191b Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Thu, 2 Nov 2023 23:44:46 +0100 Subject: [PATCH 2/6] Address review comments. --- action.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 591dbd9..e5e4db6 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: 'central-login' -description: A GitHub Action to configure login credentials for a RHACS Central instance for use in subsequent steps +description: A GitHub Action to configure login credentials for an ACS Central instance for use in subsequent steps inputs: endpoint: required: true diff --git a/package.json b/package.json index 0cb1b55..39346e6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "central-login", "version": "1.0.0", - "description": "A GitHub Action to configure login credentials for a RHACS Central instance", + "description": "A GitHub Action to configure login credentials for an ACS Central instance", "main": "src/main.ts", "scripts": { "build": "tsc", From 838d1d4618e883e064460dd21a479869a5e5a5c7 Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Fri, 3 Nov 2023 07:20:02 +0100 Subject: [PATCH 3/6] Commit dist when changes occurred. --- .github/workflows/package.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 03c98b9..2754aea 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,6 +1,8 @@ name: Package Action on: + # TODO(dhaus): Only for testing purposes. + pull_request: push: branches: - main @@ -21,6 +23,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} - name: Setup Node.js 20.x uses: actions/setup-node@v3.8.1 @@ -35,12 +39,12 @@ jobs: run: | npm run build npm run package -# TODO(dhaus): Configure secrets in repository to enable pushing the dist. -# - uses: chainguard-dev/actions/setup-gitsign@main -# - name: Commit Dist -# run: | -# git config --global user.email "roxbot@stackrox.com" -# git config --global user.name "Robot Rox" -# git add dist -# git commit -m "chore: Update dist" || echo "No changes to commit." -# git push origin + + - uses: chainguard-dev/actions/setup-gitsign@main + - name: Commit Dist + run: | + git config --global user.email "roxbot@stackrox.com" + git config --global user.name "Robot Rox" + git add dist + git commit -m "chore: Update dist" || echo "No changes to commit." + git push origin From 5e55436ce840b18413e0e2bd93b4070a045ed82b Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Fri, 3 Nov 2023 07:22:51 +0100 Subject: [PATCH 4/6] Include ref name. --- .github/workflows/package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 2754aea..839e3d0 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -25,6 +25,7 @@ jobs: uses: actions/checkout@v4 with: token: ${{ secrets.PAT }} + ref: ${{ github.ref_name }} - name: Setup Node.js 20.x uses: actions/setup-node@v3.8.1 From e9660db03aad78a7f248f85e65ade784c3ed7ff3 Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Fri, 3 Nov 2023 07:26:05 +0100 Subject: [PATCH 5/6] Fix push. --- .github/workflows/package.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 839e3d0..e87ecb3 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,11 +1,7 @@ name: Package Action on: - # TODO(dhaus): Only for testing purposes. - pull_request: push: - branches: - - main paths-ignore: - 'dist/**' workflow_dispatch: From 226e04e614bbcd8d34700e3c6f6868295ec0d1eb Mon Sep 17 00:00:00 2001 From: Daniel Haus Date: Fri, 3 Nov 2023 07:28:36 +0100 Subject: [PATCH 6/6] Revert temporarily enabling workflow on non-main branch. --- .github/workflows/package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index e87ecb3..1efe0d1 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -2,6 +2,8 @@ name: Package Action on: push: + branches: + - main paths-ignore: - 'dist/**' workflow_dispatch: