Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pipeline for build goss docker image #909

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use go version from project
  • Loading branch information
dklimpel authored May 11, 2024
commit dd09ed291fd766c103d1f6212045dcf176e8eaad
5 changes: 5 additions & 0 deletions .github/workflows/docker-goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ jobs:
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV

- name: Get the current version of Go from project.
run: echo "GO_VERSION_FROM_PROJECT=$(go mod edit -json | jq -r .Go)" >> $GITHUB_ENV

- name: Build master goss image
if: github.ref_name == 'master'
uses: docker/build-push-action@v5
with:
build-args: |
GO_VERSION=${{ env.GO_VERSION_FROM_PROJECT }}
GOSS_VERSION=${{ steps.get-latest-tag.outputs.tag }}-${{ github.ref_name }}+${{ env.COMMIT_SHORT_SHA }}
context: .
push: true
Expand All @@ -71,6 +75,7 @@ jobs:
uses: docker/build-push-action@v5
with:
build-args: |
GO_VERSION=${{ env.GO_VERSION_FROM_PROJECT }}
GOSS_VERSION=${{ github.ref_name }}
context: .
push: true
Expand Down