Skip to content

Commit

Permalink
Minor improvement to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
j0sh3rs committed Aug 31, 2024
1 parent 6f653ad commit 6724830
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ jobs:
fetch-depth: '0'
- name: Fetch all tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
# Verify only golang or Docker files have changed before we bump
- name: Get changed files
id: changed-files
Expand All @@ -38,9 +34,14 @@ jobs:
docker:
- 'Dockerfile'
- 'goreleaser.Dockerfile'
- name: Set up Go
uses: actions/setup-go@v5
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
with:
go-version: 1.22
- name: Cache Go modules
uses: actions/cache@v4
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
with:
path: |
~/.cache/go-build
Expand All @@ -50,14 +51,14 @@ jobs:
${{ runner.os }}-go-
- name: Docker Login
uses: docker/login-action@v3
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
with:
args: release --clean
distribution: goreleaser
Expand Down

0 comments on commit 6724830

Please sign in to comment.