Update actions to latest versions (#2144)
This commit is contained in:
10
.github/actions/fabric-tests/action.yml
vendored
10
.github/actions/fabric-tests/action.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2023 Google LLC
|
||||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -28,13 +28,13 @@ runs:
|
||||
echo '{"type": "service_account", "project_id": "test-only"}' \
|
||||
| tee -a $GOOGLE_APPLICATION_CREDENTIALS
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ inputs.PYTHON_VERSION }}
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'tests/requirements.txt'
|
||||
- name: Set up Terraform
|
||||
uses: hashicorp/setup-terraform@v2
|
||||
uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: ${{ inputs.TERRAFORM_VERSION }}
|
||||
terraform_wrapper: false
|
||||
@@ -47,12 +47,12 @@ runs:
|
||||
| tee -a /home/runner/.terraformrc
|
||||
mkdir -p ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||
- name: Download lockfile
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: lockfile
|
||||
path: tools/lockfile
|
||||
- name: Download Terraform provider cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||
key: ${{ runner.os }}-terraform-${{ hashFiles('tools/lockfile/.terraform.lock.hcl') }}
|
||||
|
||||
2
.github/workflows/daily-tag.yml
vendored
2
.github/workflows/daily-tag.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
name: "Create tag on master if there was activity in last 24 hours"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: "Check changes and tag"
|
||||
run: |
|
||||
|
||||
8
.github/workflows/linting.yml
vendored
8
.github/workflows/linting.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2023 Google LLC
|
||||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -22,17 +22,17 @@ jobs:
|
||||
linting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.10"
|
||||
cache: 'pip'
|
||||
cache-dependency-path: 'tools/requirements.txt'
|
||||
|
||||
- name: Set up Terraform
|
||||
uses: hashicorp/setup-terraform@v2
|
||||
uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: 1.7.4
|
||||
|
||||
|
||||
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2023 Google LLC
|
||||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
name: "Release new version"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: "Validate input"
|
||||
run: |
|
||||
@@ -42,23 +42,6 @@ jobs:
|
||||
[[ -n "${{ github.event.inputs.version }}" ]] || { echo 'Version not specified!'; exit 1; }
|
||||
[[ "${{ github.event.inputs.version }}" != v* ]] && { echo 'Version does not start with v!' ; exit 1; }
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "1.16"
|
||||
|
||||
- name: "Update all module names"
|
||||
run: |
|
||||
cd tools/tfeditor
|
||||
go build .
|
||||
./tfeditor -path ../.. -module-name "google-pso-tool/cloud-foundation-fabric/{{ .Module }}/${{ github.event.inputs.version }}"
|
||||
cd ../..
|
||||
|
||||
git config --global user.name "Release Automation"
|
||||
git config --global user.email "cloud-foundation-fabric@google.com"
|
||||
|
||||
git commit -a -m "Release version ${{ github.event.inputs.version }}"
|
||||
git push origin master
|
||||
|
||||
- name: "Tag and release"
|
||||
run: |
|
||||
git tag ${{ github.event.inputs.version }}
|
||||
|
||||
21
.github/workflows/tests.yml
vendored
21
.github/workflows/tests.yml
vendored
@@ -1,4 +1,4 @@
|
||||
# Copyright 2023 Google LLC
|
||||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -32,9 +32,9 @@ jobs:
|
||||
setup-tf-providers:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: hashicorp/setup-terraform@v2
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: ${{ env.TF_VERSION }}
|
||||
terraform_wrapper: false
|
||||
@@ -51,23 +51,24 @@ jobs:
|
||||
terraform init -upgrade=true
|
||||
|
||||
- name: Upload Terraform provider cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.TF_PLUGIN_CACHE_DIR }}
|
||||
key: ${{ runner.os }}-terraform-${{ hashFiles('tools/lockfile/.terraform.lock.hcl') }}
|
||||
|
||||
- name: Upload lockfile
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lockfile
|
||||
path: tools/lockfile/.terraform.lock.hcl
|
||||
overwrite: true
|
||||
|
||||
|
||||
examples-blueprints:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup-tf-providers
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Call composite action fabric-tests
|
||||
uses: ./.github/actions/fabric-tests
|
||||
@@ -82,7 +83,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup-tf-providers
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Call composite action fabric-tests
|
||||
uses: ./.github/actions/fabric-tests
|
||||
@@ -97,7 +98,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup-tf-providers
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Call composite action fabric-tests
|
||||
uses: ./.github/actions/fabric-tests
|
||||
@@ -112,7 +113,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup-tf-providers
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Call composite action fabric-tests
|
||||
uses: ./.github/actions/fabric-tests
|
||||
@@ -127,7 +128,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup-tf-providers
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Call composite action fabric-tests
|
||||
uses: ./.github/actions/fabric-tests
|
||||
|
||||
Reference in New Issue
Block a user