Skip to content

Commit

Permalink
fix: workflows
Browse files Browse the repository at this point in the history
Update goreleaser configuration

Reorder checkout steps to make correct use of caching

Signed-off-by: Michael Gasch <[email protected]>
  • Loading branch information
embano1 committed Jul 1, 2023
1 parent 1e5cd23 commit 4252cc9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [main]
branches: [main,master]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
branches: [main,master]
schedule:
- cron: "34 21 * * 5"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gcr-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

Expand All @@ -38,8 +40,6 @@ jobs:
go-version: ${{ matrix.go-version }}
id: go

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- id: login_to_gcp
uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gcr-prerelease-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

Expand All @@ -33,8 +35,6 @@ jobs:
go-version: ${{ matrix.go-version }}
id: go

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- id: login_to_gcp
uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: GoReleaser
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7
with:
args: release --rm-dist --release-notes RELEASE_CHANGELOG.md
args: release --clean --release-notes RELEASE_CHANGELOG.md
workdir: vmware-event-router
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -111,6 +111,8 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

Expand All @@ -120,8 +122,6 @@ jobs:
go-version: ${{ matrix.go-version }}
id: go

- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- id: login_to_gcp
uses: google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/router-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ jobs:
timeout-minutes: 20

steps:
- name: Check out code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: GoReleaser Snapshot
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7
with:
version: latest
args: release --rm-dist --snapshot
args: release --clean --snapshot
workdir: vmware-event-router
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -52,7 +52,7 @@ jobs:
with:
name: dist
path: |
vmware-event-router/dist/router_Linux_*.tar.gz
vmware-event-router/dist/router_linux_*.tar.gz
vmware-event-router/dist/checksums.txt
retention-days: 1

Expand All @@ -69,6 +69,9 @@ jobs:
KO_DOCKER_REPO: us.gcr.io/daisy-284300/veba # .../router@sha256:

steps:
- name: Check out code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Setup ko
uses: imjasonh/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6

Expand All @@ -78,9 +81,6 @@ jobs:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Get short COMMIT and TAG
run: |
echo "KO_COMMIT=$(echo -n $GITHUB_SHA | cut -c -8)" >> $GITHUB_ENV
Expand Down
5 changes: 0 additions & 5 deletions vmware-event-router/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ archives:
builds:
- router
name_template: "router_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements: &replacements
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
Expand Down

0 comments on commit 4252cc9

Please sign in to comment.