Skip to content
Merged
Changes from all commits
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
24 changes: 19 additions & 5 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: Docker Release Build

on:
release:
Expand All @@ -9,21 +9,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build
run: docker build -t ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/} .

run: |
docker build \
--label commit=$GITHUB_SHA \
--label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label tag=${GITHUB_REF##*/} \
--tag ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/}" \
--tag ghcr.io/hyperledger/firefly-dataexchange-https:head" \
.

- name: Tag release
if: github.event.action == 'released'
run: docker tag ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/} ghcr.io/hyperledger/firefly-dataexchange-https:latest

- name: Push docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-dataexchange-https:${GITHUB_REF##*/}

- name: Push head tag
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-dataexchange-https:head

- name: Push latest tag
if: github.event.action == 'released'
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push ghcr.io/hyperledger/firefly-dataexchange-https:latest
docker push ghcr.io/hyperledger/firefly-dataexchange-https:latest