File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Main Build
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ docker :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Set build tag
15+ id : build_tag_generator
16+ run : |
17+ RELEASE_TAG=$(curl https://api.github.com/repos/hyperledger/firefly-dataexchange-https/releases/latest -s | jq .tag_name -r)
18+ BUILD_TAG=$RELEASE_TAG-$(date +"%Y%m%d")-$GITHUB_RUN_NUMBER
19+ echo ::set-output name=BUILD_TAG::$BUILD_TAG
20+
21+ - name : Build
22+ run : |
23+ docker build \
24+ --label commit=$GITHUB_SHA \
25+ --label build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
26+ --label tag=${{ steps.build_tag_generator.outputs.BUILD_TAG }} \
27+ --tag ghcr.io/hyperledger/firefly-dataexchange-https:${{ steps.build_tag_generator.outputs.BUILD_TAG }} .
28+
29+ - name : Tag release
30+ run : docker tag ghcr.io/hyperledger/firefly-dataexchange-https:${{ steps.build_tag_generator.outputs.BUILD_TAG }} ghcr.io/hyperledger/firefly-dataexchange-https:head
31+
32+ - name : Push docker image
33+ run : |
34+ echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
35+ docker push ghcr.io/hyperledger/firefly-dataexchange-https:${{ steps.build_tag_generator.outputs.BUILD_TAG }}
36+
37+ - name : Push head tag
38+ run : |
39+ echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
40+ docker push ghcr.io/hyperledger/firefly-dataexchange-https:head
File renamed without changes.
You can’t perform that action at this time.
0 commit comments