-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1.11 KB
/
docker-push.yaml
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
name: Docker push
on:
push:
branches: [ master ]
tags: [ '*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Need all the history for git describe --tags to work
fetch-depth: 0
- name: Install buildx
run: |
sudo apt-get update
sudo apt-get install -y binfmt-support qemu-user-static jq
mkdir -p ~/.docker/cli-plugins
BUILDX_URL=$(curl https://api.github.com/repos/docker/buildx/releases/latest | jq -r .assets[].browser_download_url | grep amd64 | grep linux)
wget $BUILDX_URL -O ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx
docker buildx create --name xbuilder
docker buildx use xbuilder
docker buildx inspect --bootstrap
- name: Log in to registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: Build
run: docker buildx build -t ghcr.io/meyskens/talkstimer:$(git describe --tag) --push --platform "linux/amd64,linux/arm64,linux/arm" .