chore: pin GH Actions to commit sha (#765)

This commit is contained in:
freeze 2026-03-25 10:12:25 +08:00 committed by GitHub
parent 161e3bbd97
commit 62801b3b13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 45 additions and 45 deletions

View File

@ -4,7 +4,7 @@ description: Setup node and install dependencies
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
- uses: actions/setup-node@v4 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'yarn' cache: 'yarn'

View File

@ -12,6 +12,6 @@ jobs:
if: github.event.pull_request.draft == false if: github.event.pull_request.draft == false
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: rancher/gh-issue-mgr/auto-assign-action@main - uses: rancher/gh-issue-mgr/auto-assign-action@b70f0bdf12a03e5e3f33e4f92ccb6c89deb3ebd9 # main
with: with:
configuration-path: .github/auto-assign-config.yaml configuration-path: .github/auto-assign-config.yaml

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: with:
ref: ${{ github.base_ref }} ref: ${{ github.base_ref }}

View File

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: with:
ref: ${{ github.base_ref }} ref: ${{ github.base_ref }}

View File

@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Check package version - name: Check package version
env: env:

View File

@ -25,12 +25,12 @@ jobs:
name: Build & Upload Hosted name: Build & Upload Hosted
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with: with:
fetch-depth: 1 fetch-depth: 1
# Note - Cannot use the setup action here as it uses a different yarn install arg # Note - Cannot use the setup action here as it uses a different yarn install arg
- uses: actions/setup-node@v4 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'yarn' cache: 'yarn'
@ -45,19 +45,19 @@ jobs:
run: ./scripts/build-upload-gate run: ./scripts/build-upload-gate
- name: Get gcs auth - name: Get gcs auth
uses: rancher-eio/read-vault-secrets@main uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
with: with:
secrets: | secrets: |
secret/data/github/repo/${{ github.repository }}/google-auth/harvester/credentials token | GOOGLE_AUTH ; secret/data/github/repo/${{ github.repository }}/google-auth/harvester/credentials token | GOOGLE_AUTH ;
- name: Apply gcs auth - name: Apply gcs auth
# https://github.com/google-github-actions/auth # https://github.com/google-github-actions/auth
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2'
with: with:
credentials_json: "${{ env.GOOGLE_AUTH }}" credentials_json: "${{ env.GOOGLE_AUTH }}"
- name: Upload build - name: Upload build
uses: 'google-github-actions/upload-cloud-storage@v2' uses: 'google-github-actions/upload-cloud-storage@c0f6160ff80057923ff50e5e567695cea181ec23 # v2'
# https://github.com/google-github-actions/upload-cloud-storage # https://github.com/google-github-actions/upload-cloud-storage
with: with:
path: ${{steps.build-hosted.outputs.BUILD_HOSTED_DIR}} path: ${{steps.build-hosted.outputs.BUILD_HOSTED_DIR}}
@ -71,12 +71,12 @@ jobs:
name: Build & Upload Embedded name: Build & Upload Embedded
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with: with:
fetch-depth: 1 fetch-depth: 1
# Note - Cannot use the setup action here as it uses a different yarn install arg # Note - Cannot use the setup action here as it uses a different yarn install arg
- uses: actions/setup-node@v4 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'yarn' cache: 'yarn'
@ -89,19 +89,19 @@ jobs:
DISABLED_EMBED_PKG: https://releases.rancher.com/harvester-ui/plugin/harvester-1.0.3.tar.gz DISABLED_EMBED_PKG: https://releases.rancher.com/harvester-ui/plugin/harvester-1.0.3.tar.gz
- name: Get gcs auth - name: Get gcs auth
uses: rancher-eio/read-vault-secrets@main uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
with: with:
secrets: | secrets: |
secret/data/github/repo/${{ github.repository }}/google-auth/harvester/credentials token | GOOGLE_AUTH ; secret/data/github/repo/${{ github.repository }}/google-auth/harvester/credentials token | GOOGLE_AUTH ;
- name: Apply gcs auth - name: Apply gcs auth
# https://github.com/google-github-actions/auth # https://github.com/google-github-actions/auth
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2'
with: with:
credentials_json: "${{ env.GOOGLE_AUTH }}" credentials_json: "${{ env.GOOGLE_AUTH }}"
- name: Upload tar - name: Upload tar
uses: 'google-github-actions/upload-cloud-storage@v2' uses: 'google-github-actions/upload-cloud-storage@c0f6160ff80057923ff50e5e567695cea181ec23 # v2'
with: with:
path: ${{steps.build-embedded.outputs.BUILD_EMBEDED_TGZ}} path: ${{steps.build-embedded.outputs.BUILD_EMBEDED_TGZ}}
destination: releases.rancher.com/harvester-ui/dashboard destination: releases.rancher.com/harvester-ui/dashboard
@ -114,12 +114,12 @@ jobs:
name: Build & Upload Plugin name: Build & Upload Plugin
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with: with:
fetch-depth: 1 fetch-depth: 1
# Note - Cannot use the setup action here as it uses a different yarn install arg # Note - Cannot use the setup action here as it uses a different yarn install arg
- uses: actions/setup-node@v4 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'yarn' cache: 'yarn'
@ -133,19 +133,19 @@ jobs:
run: ./scripts/build-upload-gate run: ./scripts/build-upload-gate
- name: Get gcs auth - name: Get gcs auth
uses: rancher-eio/read-vault-secrets@main uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
with: with:
secrets: | secrets: |
secret/data/github/repo/${{ github.repository }}/google-auth/harvester/credentials token | GOOGLE_AUTH ; secret/data/github/repo/${{ github.repository }}/google-auth/harvester/credentials token | GOOGLE_AUTH ;
- name: Apply gcs auth - name: Apply gcs auth
# https://github.com/google-github-actions/auth # https://github.com/google-github-actions/auth
uses: 'google-github-actions/auth@v2' uses: 'google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed # v2'
with: with:
credentials_json: "${{ env.GOOGLE_AUTH }}" credentials_json: "${{ env.GOOGLE_AUTH }}"
- name: Upload plugin tar - name: Upload plugin tar
uses: 'google-github-actions/upload-cloud-storage@v2' uses: 'google-github-actions/upload-cloud-storage@c0f6160ff80057923ff50e5e567695cea181ec23 # v2'
with: with:
path: dist-pkg/${{steps.ci-build-pkg.outputs.PKG_TARBALL}} path: dist-pkg/${{steps.ci-build-pkg.outputs.PKG_TARBALL}}
destination: releases.rancher.com/harvester-ui/plugin destination: releases.rancher.com/harvester-ui/plugin
@ -155,7 +155,7 @@ jobs:
process_gcloudignore: false process_gcloudignore: false
- name: Upload plugin directory - name: Upload plugin directory
uses: 'google-github-actions/upload-cloud-storage@v2' uses: 'google-github-actions/upload-cloud-storage@c0f6160ff80057923ff50e5e567695cea181ec23 # v2'
with: with:
path: dist-pkg/${{steps.ci-build-pkg.outputs.PKG_NAME}} path: dist-pkg/${{steps.ci-build-pkg.outputs.PKG_NAME}}
destination: releases.rancher.com/harvester-ui/plugin/${{steps.ci-build-pkg.outputs.PKG_NAME}} destination: releases.rancher.com/harvester-ui/plugin/${{steps.ci-build-pkg.outputs.PKG_NAME}}

View File

@ -27,14 +27,14 @@ jobs:
build-status: ${{ job.status }} build-status: ${{ job.status }}
steps: steps:
- name: Read Secrets - name: Read Secrets
uses: rancher-eio/read-vault-secrets@main uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
with: with:
secrets: | secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ; secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ; secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ;
- name: Checkout repository (normal flow) - name: Checkout repository (normal flow)
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Enable Corepack - name: Enable Corepack
run: corepack enable run: corepack enable
@ -45,18 +45,18 @@ jobs:
git config user.email 'github-actions[bot]@users.noreply.github.com' git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with: with:
username: ${{ env.DOCKER_USERNAME }} username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }} password: ${{ env.DOCKER_PASSWORD }}
- name: Setup Helm - name: Setup Helm
uses: azure/setup-helm@v3 uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with: with:
version: v3.8.0 version: v3.8.0
- name: Setup Nodejs with yarn caching - name: Setup Nodejs with yarn caching
uses: actions/setup-node@v4 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with: with:
node-version: '20' node-version: '20'
cache: yarn cache: yarn

View File

@ -13,7 +13,7 @@ jobs:
target_branch: ${{ steps.get-version.outputs.target_branch }} target_branch: ${{ steps.get-version.outputs.target_branch }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Determine target branch - name: Determine target branch
id: get-version id: get-version
@ -44,7 +44,7 @@ jobs:
version: ${{ steps.get_version.outputs.version }} version: ${{ steps.get_version.outputs.version }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Extract version from package.json - name: Extract version from package.json
id: get_version id: get_version
@ -62,7 +62,7 @@ jobs:
contents: write contents: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup environment - name: Setup environment
run: | run: |
@ -70,7 +70,7 @@ jobs:
yarn install --frozen-lockfile yarn install --frozen-lockfile
- name: Setup Helm - name: Setup Helm
uses: azure/setup-helm@v3 uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3
with: with:
version: v3.8.0 version: v3.8.0
@ -79,7 +79,7 @@ jobs:
yarn publish-pkgs -s ${{ github.repository }} -b ${{ needs.setup-target-branch.outputs.target_branch }} -t harvester-${{ needs.extract-version.outputs.version }} yarn publish-pkgs -s ${{ github.repository }} -b ${{ needs.setup-target-branch.outputs.target_branch }} -t harvester-${{ needs.extract-version.outputs.version }}
- name: Upload charts artifact - name: Upload charts artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with: with:
name: charts name: charts
path: tmp path: tmp
@ -94,7 +94,7 @@ jobs:
contents: write contents: write
steps: steps:
- name: Checkout release branch - name: Checkout release branch
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: with:
ref: '${{ github.ref_name }}' ref: '${{ github.ref_name }}'
@ -105,7 +105,7 @@ jobs:
echo "LAST_COMMIT=${LAST_COMMIT}" >> $GITHUB_ENV echo "LAST_COMMIT=${LAST_COMMIT}" >> $GITHUB_ENV
- name: Checkout target branch - name: Checkout target branch
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: with:
ref: '${{ needs.setup-target-branch.outputs.target_branch }}' ref: '${{ needs.setup-target-branch.outputs.target_branch }}'
@ -121,7 +121,7 @@ jobs:
git config user.email 'github-actions[bot]@users.noreply.github.com' git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Download build artifacts - name: Download build artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with: with:
name: charts name: charts
@ -132,7 +132,7 @@ jobs:
git push origin ${{ needs.setup-target-branch.outputs.target_branch }} git push origin ${{ needs.setup-target-branch.outputs.target_branch }}
- name: Run Helm chart releaser - name: Run Helm chart releaser
uses: helm/chart-releaser-action@v1.7.0 uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
with: with:
charts_dir: ./charts charts_dir: ./charts
env: env:

View File

@ -17,7 +17,7 @@ jobs:
release_tag: ${{ steps.determine_tag.outputs.release_tag }} release_tag: ${{ steps.determine_tag.outputs.release_tag }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Determine release tag - name: Determine release tag
id: determine_tag id: determine_tag
@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Check package version - name: Check package version
env: env:
TAG_VERSION: ${{ github.event.release.tag_name }} TAG_VERSION: ${{ github.event.release.tag_name }}
@ -43,7 +43,7 @@ jobs:
needs: needs:
- setup-release-tag - setup-release-tag
- check-version - check-version
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@9eb70a732e9be146722e1dbab431338366c2afc6 # creators-pkg-v3.0.10
permissions: permissions:
actions: write actions: write
contents: write contents: write

View File

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Check package version - name: Check package version
env: env:
TAG_VERSION: ${{github.ref_name}} TAG_VERSION: ${{github.ref_name}}

View File

@ -20,13 +20,13 @@ jobs:
# The FOSSA token is shared between all repos in Harvester's GH org. It can # The FOSSA token is shared between all repos in Harvester's GH org. It can
# be used directly and there is no need to request specific access to EIO. # be used directly and there is no need to request specific access to EIO.
- name: Read FOSSA token - name: Read FOSSA token
uses: rancher-eio/read-vault-secrets@main uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
with: with:
secrets: | secrets: |
secret/data/github/org/harvester/fossa/credentials token | FOSSA_API_KEY_PUSH_ONLY secret/data/github/org/harvester/fossa/credentials token | FOSSA_API_KEY_PUSH_ONLY
- name: FOSSA scan - name: FOSSA scan
uses: fossas/fossa-action@main uses: fossas/fossa-action@c414b9ad82eaad041e47a7cf62a4f02411f427a0 # v1.8.0
with: with:
api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }} api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
# Only runs the scan and do not provide/returns any results back to the # Only runs the scan and do not provide/returns any results back to the

View File

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: with:
ref: ${{ github.base_ref }} ref: ${{ github.base_ref }}
- name: Setup Nodejs and yarn install - name: Setup Nodejs and yarn install

View File

@ -16,7 +16,7 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with: with:
fetch-depth: 0 # Need full history for commit-lint fetch-depth: 0 # Need full history for commit-lint