Skip to content

Commit

Permalink
release workflow: Update to support multiarch images
Browse files Browse the repository at this point in the history
  • Loading branch information
devplayer0 committed Jul 22, 2021
1 parent 2c5df58 commit fcab5f1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ jobs:

env:
DOCKER_REPO: ghcr.io/netsoc/iamd
RELEASE_NAME: iamd

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-go@v2
with:
go-version: '^1.16.5'
- name: Install crane
run: go install github.com/google/go-containerregistry/cmd/crane@v0.5.1

- id: vars
name: Generate release vars
run: |
Expand All @@ -34,10 +41,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tag Docker image
run: |
docker pull "$DOCKER_REPO:latest"
docker tag "$DOCKER_REPO:latest" "$DOCKER_REPO:${{ steps.vars.outputs.version }}"
docker push "$DOCKER_REPO:${{ steps.vars.outputs.version }}"
run: crane tag ${{ env.DOCKER_REPO }}:latest ${{ steps.vars.outputs.version }}

- name: Create Release
id: create_release
Expand All @@ -46,5 +50,5 @@ jobs:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.vars.outputs.version }}
release_name: ${{ env.RELEASE_NAME }} ${{ steps.vars.outputs.version }}
body_path: release.md

0 comments on commit fcab5f1

Please sign in to comment.