From b909fb3e36d4250d297f7d0af2dc67bf15eff690 Mon Sep 17 00:00:00 2001 From: Shawn Poulson Date: Tue, 21 Nov 2023 11:48:12 -0500 Subject: [PATCH] Update GHA workflows. --- .github/workflows/lint.yaml | 11 +++-------- .github/workflows/on-pull-request.yml | 10 ++++------ .github/workflows/on-release.yml | 10 +++++----- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index bf274c58..57947401 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,13 +1,8 @@ -# Optional workflow for Go Static Code Analysis check, -# copy this file to yours /.github/workflows folder only if you need this. -# See https://mailgun.atlassian.net/wiki/spaces/ENG/pages/4278943767/Go+Static+Code+Analysis+Linters - name: Lint on: push: - branches: - - master + branches: [ master ] pull_request: env: @@ -22,9 +17,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v1 - - name: Install Go + - name: Set up Go uses: actions/setup-go@v3 with: go-version-file: ./go.mod diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 3f0d8191..19db96ad 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -2,7 +2,7 @@ name: On Pull Request on: pull_request: - branches: [ master, main ] + branches: [ master ] jobs: test: @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v1 - name: Fetch git tags run: git fetch --tags @@ -25,14 +25,12 @@ jobs: run: ./contrib/check-version.sh - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} - - run: go env - - name: Cache deps - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 6d45621d..e52ed80c 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -2,14 +2,14 @@ name: On Release Workflow on: release: - types: [published] + types: [ published ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v1 - name: Fetch git tags run: git fetch --tags @@ -19,14 +19,14 @@ jobs: # Buildx Needs QEMU - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 # We use Buildx so we can take advantage of the caching - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }}