From 576617276a811e3b6ca267d1647bc1caf2d6a525 Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Tue, 12 Sep 2023 23:37:47 +0200 Subject: [PATCH 1/3] feat: Run action on node v20 --- .github/workflows/test.yml | 3 +++ action.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5318097..eda3f10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,9 @@ jobs: - run: npm install - run: npm run package - run: npm run test + - uses: actions/setup-node@v3 + with: + node-version: 20 - id: default uses: ./ - name: Test current commit hash is used by default diff --git a/action.yml b/action.yml index 5720446..5517086 100644 --- a/action.yml +++ b/action.yml @@ -20,5 +20,5 @@ outputs: hash: description: "Original, 40-character SHA-1 hash received as `commit` input" runs: - using: "node16" + using: "node20" main: "dist/index.js" From 60a86883ac3953e5d0cd0490e62bfe0adb1b2cab Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Tue, 12 Sep 2023 23:39:33 +0200 Subject: [PATCH 2/3] ci: Describe diff versions of node --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eda3f10..1794a9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,13 +10,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 + - name: Build action on node v16 + uses: actions/setup-node@v3 with: node-version: 16 - run: npm install - run: npm run package - run: npm run test - - uses: actions/setup-node@v3 + - name: Test action on node v20 + uses: actions/setup-node@v3 with: node-version: 20 - id: default From 4f2741f9bc50094575c66ff7a73033612b60f49f Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Tue, 12 Sep 2023 23:42:06 +0200 Subject: [PATCH 3/3] docs: Update to v3 --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 89954f0..548bf07 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A GitHub Action for using the long and short [hash of a commit][git/commits] — with an optional prefix. ``` -prompt/actions-commit-hash@v2 +prompt/actions-commit-hash@v3 ``` :package: [Automatic Release Packaging](#automatic-release-packaging) is used by @@ -41,10 +41,10 @@ jobs: steps: steps: - id: commit - uses: prompt/actions-commit-hash@v2 - - uses: docker/setup-buildx-action@v1 + uses: prompt/actions-commit-hash@v3 + - uses: docker/setup-buildx-action@v3 - name: Build image for commit - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: push: true tags: ${{ steps.commit.outputs.short }} @@ -71,13 +71,13 @@ jobs: steps: steps: - id: commit - uses: prompt/actions-commit-hash@v2 + uses: prompt/actions-commit-hash@v3 with: commit: "${{ github.event.workflow_run.head_sha }}" prefix: "sha-" - - uses: docker/setup-buildx-action@v1 + - uses: docker/setup-buildx-action@v3 - name: Build image for commit - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: push: true tags: ${{ steps.commit.outputs.short }} @@ -90,8 +90,8 @@ Any reference to this Action in a Workflow must use a [tag][tags] (mutable) or the commit hash of a tag (immutable). ```yaml -✅ uses: prompt/actions-commit-hash@v2 -✅ uses: prompt/actions-commit-hash@v2.0.0 +✅ uses: prompt/actions-commit-hash@v3 +✅ uses: prompt/actions-commit-hash@v3.0.0 ✅ uses: prompt/actions-commit-hash@01d19a83c242e1851c9aa6cf9625092ecd095d09 ❌ uses: prompt/actions-commit-hash@main ```