Skip to content

Commit

Permalink
Fix Docker push of shortened SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
lspgn authored and job committed Oct 20, 2021
1 parent 6d1c068 commit 3efd336
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Get short SHA from commit hash
id: shacalc
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"

- name: Check Out Repo
uses: actions/checkout@v2

Expand All @@ -28,7 +31,7 @@ jobs:
context: ./
file: ./Dockerfile
push: true
tags: rpki/stayrtr:latest,rpki/stayrtr:${GITHUB_SHA::8}
tags: rpki/stayrtr:latest,rpki/stayrtr:${{ steps.shacalc.outputs.sha8 }}
target: stayrtr

- name: Image digest (stayrtr)
Expand All @@ -41,7 +44,7 @@ jobs:
context: ./
file: ./Dockerfile
push: true
tags: rpki/rtrmon:latest,rpki/rtrmon:${GITHUB_SHA::8}
tags: rpki/rtrmon:latest,rpki/rtrmon:${{ steps.shacalc.outputs.sha8 }}
target: rtrmon

- name: Image digest (rtrmon)
Expand All @@ -54,7 +57,7 @@ jobs:
context: ./
file: ./Dockerfile
push: true
tags: rpki/rtrdump:latest,rpki/rtrdump:${GITHUB_SHA::8}
tags: rpki/rtrdump:latest,rpki/rtrdump:${{ steps.shacalc.outputs.sha8 }}
target: rtrdump

- name: Image digest (rtrdump)
Expand Down

0 comments on commit 3efd336

Please sign in to comment.