-
Notifications
You must be signed in to change notification settings - Fork 1.6k
37 lines (33 loc) · 1.33 KB
/
release-v2-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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