Skip to content

Commit

Permalink
GitHub Actions Updates (#2956)
Browse files Browse the repository at this point in the history
Updates our github action versions for future proofing and to silence deprecation warnings.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
  • Loading branch information
dtfranz authored Apr 24, 2023
1 parent b5a885e commit 3e00959
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Build the container image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
parallel-id: [0, 1, 2, 3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- run: mkdir -p artifacts
- run: make e2e-local E2E_TEST_CHUNK=${{ matrix.parallel-id }} E2E_TEST_NUM_CHUNKS=${{ strategy.job-total }} E2E_NODES=2 ARTIFACT_DIR=./artifacts/ SKIP='\[FLAKE\]'
- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: e2e-test-output-${{ (github.event.pull_request.head.sha || github.sha) }}-${{ github.run_id }}-${{ matrix.parallel-id }}
path: ${{ github.workspace }}/bin/artifacts/*
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/flaky-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
flaky-e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- run: mkdir -p artifacts
- run: make e2e-local E2E_NODES=1 TEST='\[FLAKE\]' ARTIFACT_DIR=./artifacts/
- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: e2e-test-output-${{(github.event.pull_request.head.sha||github.sha)}}-${{ github.run_id }}
path: ${{ github.workspace }}/bin/artifacts/*
13 changes: 8 additions & 5 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"

Expand All @@ -25,7 +25,10 @@ jobs:
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo IMAGE_TAG="${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
# TODO dtfranz
# This action uses node12 and the source repo is archived;
# we should remove it or find a suitable replacement before it becomes a blocker.
- name: Create a draft release
uses: actions/create-release@v1
id: release
Expand All @@ -42,15 +45,15 @@ jobs:
if: startsWith(github.ref, 'refs/tags')

- name: Docker Login
uses: docker/login-action@v1
uses: docker/login-action@v2
if: startsWith(github.ref, 'refs/tags')
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags')
with:
version: 0.177.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
install-quickstart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- run: |
curl -sLo kind "$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '[.assets[] | select(.name == "kind-linux-amd64")] | first | .browser_download_url')"
chmod +x kind
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-kind-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
e2e-kind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Install kind
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-minikube-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
e2e-minikube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Install minikube
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
vendor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Run sanity checks
run: make vendor && make diff
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Run linting checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
- name: Envtest setup
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"

# Note(tflannag): We need to explicitly setup the GOPATH as the generate-internal-groups.sh
# codegen script still relies on $GOPATH being set and will return an error otherwise.
# The setup-go action does not set this value for us: https://github.com/actions/setup-go/issues/14.
- name: Run the verify target
run: |
export GOPATH=$(go env GOPATH)
make verify
run: GOPATH=$(go env GOPATH) make verify

0 comments on commit 3e00959

Please sign in to comment.