Skip to content

Commit

Permalink
Pinned versions for GitHub Actions (GoogleCloudPlatform#10239)
Browse files Browse the repository at this point in the history
  • Loading branch information
melinath authored Mar 20, 2024
1 parent 50e4091 commit 982d61a
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
fetch-depth: 0

Expand All @@ -31,7 +31,7 @@ jobs:
ruby-version: '3.1'

- name: Cache Bundler gems
uses: actions/cache@v3
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: mmv1/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('mmv1/**/Gemfile.lock') }}
Expand All @@ -45,13 +45,13 @@ jobs:
working-directory: mmv1

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'

# Cache Go modules
- name: Cache Go modules
uses: actions/cache@v3
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
(current_dir=$(pwd) && cd $OUTPUT_PATH && zip -r "$current_dir/output.zip" .)
- name: Upload built artifacts
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: artifact-${{ inputs.repo }}
path: output.zip
2 changes: 1 addition & 1 deletion .github/workflows/changelog-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
path: repo
- name: Check Changelog
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/membership-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
build-and-unit-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
- name: Run membership checker unit tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mmv1-lint-product-yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
path: repo
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mmv1-rake-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
path: repo
fetch-depth: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repository-documentation-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repository-documentation-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/request-reviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
# Disable caching for now due to issues with large provider dependency caches
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/teamcity-services-diff-check-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
- name: TeamCity Google Provider Generate
uses: ./.github/actions/build-downstream
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/teamcity-services-diff-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
fetch-depth: 0
- name: "Check for New Services"
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
run: echo "GOOGLE_BETA_REPO_PATH=${{ env.OUTPUT_PATH}}" >> $GITHUB_ENV
- name: Checkout Repository
if: steps.generate.outcome == 'success'
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
- name: Check that new services have been added to the TeamCity configuration code
if: steps.generate.outcome == 'success'
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:
"state": "pending"
}'
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
repository: ${{ github.event.inputs.owner }}/${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.branch }}
fetch-depth: 2
- name: Cache Go modules and build cache
uses: actions/cache@v3
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/go/pkg/mod
Expand All @@ -78,7 +78,7 @@ jobs:
fi
- name: Set up Go
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
- name: Build Terraform Google Conversion
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-tpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
"state": "pending"
}'
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
with:
repository: ${{ github.event.inputs.owner }}/${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.branch }}
Expand All @@ -68,7 +68,7 @@ jobs:
fi
- name: Set up Go
if: ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'
- name: Build Provider
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-test-tgc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Download built artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: artifact-terraform-google-conversion
path: artifacts-tgc

- name: Download built artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: artifact-terraform-provider-google-beta
path: artifacts-tpgb
Expand All @@ -28,12 +28,12 @@ jobs:
rm artifacts-tpgb/output.zip
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'

- name: Cache Go modules and build cache
uses: actions/cache@v3
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/go/pkg/mod
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test-tpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Download built artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: artifact-${{ inputs.repo }}
path: artifacts
Expand All @@ -26,7 +26,7 @@ jobs:
rm artifacts/output.zip
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-diff-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '^1.21.0'

Expand Down

0 comments on commit 982d61a

Please sign in to comment.