Build and publish the Drogon image #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish the Drogon image | |
on: | |
workflow_run: | |
workflows: ["Build and publish the gochain image"] | |
types: [completed] | |
jobs: | |
build-drogon-image: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Drogon version | |
id: repository | |
run: echo "::set-output name=tag::$(cat package.json|grep '"version'|cut -d '"' -f4)" | |
- name: Log in to docker hub registry | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build & push container to docker hub | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
context: . | |
file: ./dockerfiles/Dockerfile.debian | |
tags: iconcommunity/drogon:${{ steps.repository.outputs.tag }}, iconcommunity/drogon:latest |