-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (40 loc) · 1.17 KB
/
docker-publish.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
38
39
40
41
42
43
44
45
46
47
48
name: Docker
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
env:
# TODO: Change variable to your image's name.
IMAGE_NAME: elements
VERSION: "23.2.1"
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'
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- 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 image
run: >-
docker buildx build --push
--file ./$VERSION/Dockerfile
--tag ghcr.io/vulpemventures/$IMAGE_NAME:latest
--tag ghcr.io/vulpemventures/$IMAGE_NAME:$VERSION
--platform linux/arm64,linux/amd64 .