-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (42 loc) · 1.31 KB
/
docker-publish.yml
File metadata and controls
51 lines (42 loc) · 1.31 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Convoar Docker image
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
env:
IMAGE_NAME: convoar
IMAGE_OWNER: misterblue
jobs:
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: checkout
uses: actions/checkout@v2
- name: Place version number into environment
run: |
echo "CVERSION=$(cat VERSION)" >> $GITHUB_ENV
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Login to Github Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./docker
build-args: |
TARGET=Release
VERSION=${{ env.CVERSION }}
platforms: linux/amd64
# platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ env.CVERSION }}