Skip to content

Commit

Permalink
build: Optimise Docker build (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdotb committed Aug 17, 2022
1 parent b7c19fe commit 44c9f88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version
persist-credentials: false

- uses: actions/setup-go@v3
with:
Expand All @@ -34,6 +35,10 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

# Setup for pushing to Buf.build later
- uses: bufbuild/buf-setup-action@v1.7.0

# Required for short-lived token provided to Semantic Release
- name: "Obtain Github App token"
id: app-token
uses: getsentry/action-github-app-token@v1.0.6
Expand Down Expand Up @@ -64,6 +69,12 @@ jobs:
RELEASE_VERSION=$( git describe --tags ${{ github.sha }})
echo ::set-output name=RELEASE_VERSION::"$RELEASE_VERSION"
# Push Protobufs to Buf.build registry
- uses: bufbuild/buf-push-action@v1
with:
input: proto
buf_token: ${{ secrets.BUF_TOKEN }}

release-docker:
name: "Docker image"
needs: release-binary
Expand All @@ -73,15 +84,13 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version
persist-credentials: false

- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod
cache: true

- name: Generate golang code
run: make proto-gen

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Expand Up @@ -50,7 +50,7 @@ checksum:
algorithm: sha256

changelog:
use: github
use: github-native
sort: asc
groups:
- title: Features
Expand Down

0 comments on commit 44c9f88

Please sign in to comment.