generated from linz/template-javascript-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1.08 KB
/
push.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
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: linz/action-typescript@v2
- name: Pull Tags
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* # see https://stackoverflow.com/a/60184319/9285308
- name: Set up Docker Qemu
id: qemu
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Set GIT_VERSION
id: version
run: |
GIT_VERSION=$(git describe --tags --always --match 'v*')
echo "version=${GIT_VERSION}" >> $GITHUB_OUTPUT
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: "basemaps-screenshot/cli - Build and push"
uses: docker/build-push-action@v4
with:
context: ./
platforms: linux/arm64,linux/amd64
tags: ghcr.io/linz/basemaps-screenshot/cli:${{ steps.version.outputs.version }}
push: ${{github.ref == 'refs/heads/master'}}