Skip to content

Build docker image for latest release #23

Build docker image for latest release

Build docker image for latest release #23

name: Build docker image for latest release
on:
workflow_dispatch:
release:
types: [published]
jobs:
build_docker:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get project versions
run: |
echo "server_version=$(cat package.json | jq ".version" | tr -d '"\r\n')" >> $GITHUB_OUTPUT
echo "client_version=$(cat faucet-client/package.json | jq ".version" | tr -d '"\r\n')" >> $GITHUB_OUTPUT
id: version
- name: Build version specific docker image
run: docker build . --file Dockerfile --tag pk910/powfaucet:v${{ steps.version.outputs.server_version }}
- name: Push version specific docker image
run: docker push pk910/powfaucet:v${{ steps.version.outputs.server_version }}
- name: Build v2-stable docker image
run: docker build . --file Dockerfile --tag pk910/powfaucet:v2-stable
- name: Push v2-stable docker image
run: docker push pk910/powfaucet:v2-stable