-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.27 KB
/
releases.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
name: Releases
on:
release:
types:
- published
env:
IMAGE_NAME: theknarf/dave
DOCKERHUB_USERNAME: theknarf
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log into registry
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u $DOCKERHUB_USERNAME --password-stdin
- name: Build Docker image
run: |
docker buildx build . \
--push \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
--tag "$IMAGE_NAME:latest" \
--tag "$IMAGE_NAME:${{ github.event.release.tag_name}}"
# This action does not yet work with dockerhub personal access token
# Issue: https://github.com/peter-evans/dockerhub-description/issues/10
# - name: Docker Hub Description
# uses: peter-evans/dockerhub-description@v2
# with:
# username: $DOCKERHUB_USERNAME
# password: ${{ secrets.DOCKERHUB_PASSWORD }}
# repository: $IMAGE_NAME
# readme-filepath: ./Readme.md