mirror of https://github.com/linkerd/linkerd2.git
Use SHAs instead of tags when referring to GH Actions libs (#4114)
When adding an action we can quickly vet it and fix it to a sha. Whereas if we use a tag, the 3rd party can change the code and retag it without us noticing
This commit is contained in:
parent
edd7fd203d
commit
a65f76ed22
|
@ -13,7 +13,8 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Setup SSH config for Packet
|
- name: Setup SSH config for Packet
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh/
|
mkdir -p ~/.ssh/
|
||||||
|
@ -36,13 +37,15 @@ jobs:
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Set environment variables from scripts
|
- name: Set environment variables from scripts
|
||||||
run: |
|
run: |
|
||||||
. bin/_tag.sh
|
. bin/_tag.sh
|
||||||
echo ::set-env name=TAG::$(CI_FORCE_CLEAN=1 bin/root-tag)
|
echo ::set-env name=TAG::$(CI_FORCE_CLEAN=1 bin/root-tag)
|
||||||
- name: Configure gcloud
|
- name: Configure gcloud
|
||||||
uses: linkerd/linkerd2-action-gcloud@v1.0.1
|
# linkerd/linkerd2-action-gcloud@v1.0.1
|
||||||
|
uses: linkerd/linkerd2-action-gcloud@308c4df
|
||||||
with:
|
with:
|
||||||
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
||||||
gcp_project: ${{ secrets.GCP_PROJECT }}
|
gcp_project: ${{ secrets.GCP_PROJECT }}
|
||||||
|
@ -71,9 +74,11 @@ jobs:
|
||||||
needs: [docker_push]
|
needs: [docker_push]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Try to load cached Go modules
|
- name: Try to load cached Go modules
|
||||||
uses: actions/cache@v1
|
# actions/cache@v1.1.2
|
||||||
|
uses: actions/cache@70655ec
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
@ -92,7 +97,8 @@ jobs:
|
||||||
echo "Installed Linkerd CLI version: $TAG"
|
echo "Installed Linkerd CLI version: $TAG"
|
||||||
echo "::set-output name=tag::$TAG"
|
echo "::set-output name=tag::$TAG"
|
||||||
- name: Create GKE cluster
|
- name: Create GKE cluster
|
||||||
uses: linkerd/linkerd2-action-gcloud@v1.0.1
|
# linkerd/linkerd2-action-gcloud@v1.0.1
|
||||||
|
uses: linkerd/linkerd2-action-gcloud@308c4df
|
||||||
with:
|
with:
|
||||||
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
||||||
gcp_project: ${{ secrets.GCP_PROJECT }}
|
gcp_project: ${{ secrets.GCP_PROJECT }}
|
||||||
|
|
|
@ -13,7 +13,8 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Set environment variables from scripts
|
- name: Set environment variables from scripts
|
||||||
run: |
|
run: |
|
||||||
. bin/_tag.sh
|
. bin/_tag.sh
|
||||||
|
@ -58,7 +59,8 @@ jobs:
|
||||||
# https://github.com/actions/upload-artifact/issues/8
|
# https://github.com/actions/upload-artifact/issues/8
|
||||||
- name: Upload artifact (Forked repositories)
|
- name: Upload artifact (Forked repositories)
|
||||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork
|
||||||
uses: actions/upload-artifact@v1
|
# actions/upload-artifact@v1
|
||||||
|
uses: actions/upload-artifact@3446296
|
||||||
with:
|
with:
|
||||||
name: image-archives
|
name: image-archives
|
||||||
path: /home/runner/archives
|
path: /home/runner/archives
|
||||||
|
@ -72,9 +74,11 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Try to load cached Go modules
|
- name: Try to load cached Go modules
|
||||||
uses: actions/cache@v1
|
# actions/cache@v1.1.2
|
||||||
|
uses: actions/cache@70655ec
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
@ -97,7 +101,8 @@ jobs:
|
||||||
echo "${{ secrets.DOCKER_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
echo "${{ secrets.DOCKER_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
||||||
- name: Download image archives (Forked repositories)
|
- name: Download image archives (Forked repositories)
|
||||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork
|
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork
|
||||||
uses: actions/download-artifact@v1
|
# actions/download-artifact@v1
|
||||||
|
uses: actions/download-artifact@18f0f59
|
||||||
with:
|
with:
|
||||||
name: image-archives
|
name: image-archives
|
||||||
- name: Load cli-bin image into local docker images
|
- name: Load cli-bin image into local docker images
|
||||||
|
@ -122,12 +127,14 @@ jobs:
|
||||||
[[ "$TAG" == "$($HOME/.linkerd version --short --client)" ]]
|
[[ "$TAG" == "$($HOME/.linkerd version --short --client)" ]]
|
||||||
- name: Setup default KinD cluster
|
- name: Setup default KinD cluster
|
||||||
if: matrix.integration_test != 'custom_domain'
|
if: matrix.integration_test != 'custom_domain'
|
||||||
uses: engineerd/setup-kind@v0.3.0
|
# engineerd/setup-kind@v0.3.0
|
||||||
|
uses: engineerd/setup-kind@d0e9be1
|
||||||
with:
|
with:
|
||||||
version: "v0.6.1"
|
version: "v0.6.1"
|
||||||
- name: Setup custom_domain KinD cluster
|
- name: Setup custom_domain KinD cluster
|
||||||
if: matrix.integration_test == 'custom_domain'
|
if: matrix.integration_test == 'custom_domain'
|
||||||
uses: engineerd/setup-kind@v0.3.0
|
# engineerd/setup-kind@v0.3.0
|
||||||
|
uses: engineerd/setup-kind@d0e9be1
|
||||||
with:
|
with:
|
||||||
config: test/testdata/custom_cluster_domain_config.yaml
|
config: test/testdata/custom_cluster_domain_config.yaml
|
||||||
version: "v0.6.1"
|
version: "v0.6.1"
|
||||||
|
|
|
@ -18,7 +18,8 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Setup SSH config for Packet
|
- name: Setup SSH config for Packet
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh/
|
mkdir -p ~/.ssh/
|
||||||
|
@ -41,13 +42,15 @@ jobs:
|
||||||
needs: [docker_build]
|
needs: [docker_build]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Set environment variables from scripts
|
- name: Set environment variables from scripts
|
||||||
run: |
|
run: |
|
||||||
. bin/_tag.sh
|
. bin/_tag.sh
|
||||||
echo ::set-env name=TAG::$(CI_FORCE_CLEAN=1 bin/root-tag)
|
echo ::set-env name=TAG::$(CI_FORCE_CLEAN=1 bin/root-tag)
|
||||||
- name: Configure gcloud
|
- name: Configure gcloud
|
||||||
uses: linkerd/linkerd2-action-gcloud@v1.0.1
|
# linkerd/linkerd2-action-gcloud@v1.0.1
|
||||||
|
uses: linkerd/linkerd2-action-gcloud@308c4df
|
||||||
with:
|
with:
|
||||||
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
||||||
gcp_project: ${{ secrets.GCP_PROJECT }}
|
gcp_project: ${{ secrets.GCP_PROJECT }}
|
||||||
|
@ -79,9 +82,11 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Try to load cached Go modules
|
- name: Try to load cached Go modules
|
||||||
uses: actions/cache@v1
|
# actions/cache@v1.1.2
|
||||||
|
uses: actions/cache@70655ec
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
@ -119,12 +124,14 @@ jobs:
|
||||||
[[ "$TAG" == "$($HOME/.linkerd version --short --client)" ]]
|
[[ "$TAG" == "$($HOME/.linkerd version --short --client)" ]]
|
||||||
- name: Setup default KinD cluster
|
- name: Setup default KinD cluster
|
||||||
if: matrix.integration_test != 'custom_domain'
|
if: matrix.integration_test != 'custom_domain'
|
||||||
uses: engineerd/setup-kind@v0.3.0
|
# engineerd/setup-kind@v0.3.0
|
||||||
|
uses: engineerd/setup-kind@d0e9be1
|
||||||
with:
|
with:
|
||||||
version: "v0.6.1"
|
version: "v0.6.1"
|
||||||
- name: Setup custom_domain KinD cluster
|
- name: Setup custom_domain KinD cluster
|
||||||
if: matrix.integration_test == 'custom_domain'
|
if: matrix.integration_test == 'custom_domain'
|
||||||
uses: engineerd/setup-kind@v0.3.0
|
# engineerd/setup-kind@v0.3.0
|
||||||
|
uses: engineerd/setup-kind@d0e9be1
|
||||||
with:
|
with:
|
||||||
config: test/testdata/custom_cluster_domain_config.yaml
|
config: test/testdata/custom_cluster_domain_config.yaml
|
||||||
version: "v0.6.1"
|
version: "v0.6.1"
|
||||||
|
@ -168,9 +175,11 @@ jobs:
|
||||||
needs: [docker_push]
|
needs: [docker_push]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Try to load cached Go modules
|
- name: Try to load cached Go modules
|
||||||
uses: actions/cache@v1
|
# actions/cache@v1.1.2
|
||||||
|
uses: actions/cache@70655ec
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
@ -189,7 +198,8 @@ jobs:
|
||||||
echo "Installed Linkerd CLI version: $TAG"
|
echo "Installed Linkerd CLI version: $TAG"
|
||||||
echo "::set-output name=tag::$TAG"
|
echo "::set-output name=tag::$TAG"
|
||||||
- name: Create GKE cluster
|
- name: Create GKE cluster
|
||||||
uses: linkerd/linkerd2-action-gcloud@v1.0.1
|
# linkerd/linkerd2-action-gcloud@v1.0.1
|
||||||
|
uses: linkerd/linkerd2-action-gcloud@308c4df
|
||||||
with:
|
with:
|
||||||
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
cloud_sdk_service_account_key: ${{ secrets.CLOUD_SDK_SERVICE_ACCOUNT_KEY }}
|
||||||
gcp_project: ${{ secrets.GCP_PROJECT }}
|
gcp_project: ${{ secrets.GCP_PROJECT }}
|
||||||
|
@ -215,7 +225,8 @@ jobs:
|
||||||
needs: [kind_integration_tests, cloud_integration_tests]
|
needs: [kind_integration_tests, cloud_integration_tests]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Set environment variables from scripts
|
- name: Set environment variables from scripts
|
||||||
run: |
|
run: |
|
||||||
. bin/_tag.sh
|
. bin/_tag.sh
|
||||||
|
@ -224,6 +235,7 @@ jobs:
|
||||||
run : bin/docker-pull-binaries $TAG
|
run : bin/docker-pull-binaries $TAG
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
# softprops/action-gh-release@v1
|
||||||
uses: softprops/action-gh-release@91409e7
|
uses: softprops/action-gh-release@91409e7
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -244,7 +256,8 @@ jobs:
|
||||||
needs: [kind_integration_tests, cloud_integration_tests]
|
needs: [kind_integration_tests, cloud_integration_tests]
|
||||||
steps:
|
steps:
|
||||||
- name: Create linkerd/website repository dispatch event
|
- name: Create linkerd/website repository dispatch event
|
||||||
uses: peter-evans/repository-dispatch@v1
|
# peter-evans/repository-dispatch@v1
|
||||||
|
uses: peter-evans/repository-dispatch@0ae1c4b
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
repository: linkerd/website
|
repository: linkerd/website
|
||||||
|
@ -256,7 +269,8 @@ jobs:
|
||||||
needs: [website_publish]
|
needs: [website_publish]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Set environment variables from scripts
|
- name: Set environment variables from scripts
|
||||||
run: |
|
run: |
|
||||||
. bin/_tag.sh
|
. bin/_tag.sh
|
||||||
|
@ -284,9 +298,11 @@ jobs:
|
||||||
needs: [gh_release]
|
needs: [gh_release]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Configure gsutils
|
- name: Configure gsutils
|
||||||
uses: linkerd/linkerd2-action-gcloud@v1.0.1
|
# linkerd/linkerd2-action-gcloud@v1.0.1
|
||||||
|
uses: linkerd/linkerd2-action-gcloud@308c4df
|
||||||
with:
|
with:
|
||||||
cloud_sdk_service_account_key: ${{ secrets.LINKERD_SITE_TOKEN }}
|
cloud_sdk_service_account_key: ${{ secrets.LINKERD_SITE_TOKEN }}
|
||||||
gcp_project: ${{ secrets.LINKERD_SITE_PROJECT }}
|
gcp_project: ${{ secrets.LINKERD_SITE_PROJECT }}
|
||||||
|
|
|
@ -13,7 +13,8 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Dump env
|
- name: Dump env
|
||||||
run: env | sort
|
run: env | sort
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
|
@ -37,7 +38,8 @@ jobs:
|
||||||
image: golang:1.13.4
|
image: golang:1.13.4
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Go lint
|
- name: Go lint
|
||||||
env:
|
env:
|
||||||
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
|
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
|
||||||
|
@ -51,7 +53,8 @@ jobs:
|
||||||
image: golang:1.13.4
|
image: golang:1.13.4
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Format
|
- name: Format
|
||||||
env:
|
env:
|
||||||
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
|
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
|
||||||
|
|
|
@ -15,7 +15,8 @@ jobs:
|
||||||
image: golang:1.13.4
|
image: golang:1.13.4
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Go unit tests
|
- name: Go unit tests
|
||||||
env:
|
env:
|
||||||
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
|
GITCOOKIE_SH: ${{ secrets.GITCOOKIE_SH }}
|
||||||
|
@ -30,7 +31,8 @@ jobs:
|
||||||
image: node:10.16.0-stretch
|
image: node:10.16.0-stretch
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
# actions/checkout@v2
|
||||||
|
uses: actions/checkout@722adc6
|
||||||
- name: Yarn setup
|
- name: Yarn setup
|
||||||
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1 --network-concurrency 1
|
run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1 --network-concurrency 1
|
||||||
- name: JS unit tests
|
- name: JS unit tests
|
||||||
|
|
Loading…
Reference in New Issue