-
Notifications
You must be signed in to change notification settings - Fork 34
42 lines (39 loc) · 1.12 KB
/
ci.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
name: Continuous Integration
on:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF##*/}
echo ::set-output name=tag_name::${TAG}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login do docker.io
if: startsWith(github.ref, 'refs/tags/')
run: docker login -u navicore -p ${{ secrets.DOCKER_TOKEN }}
- name: build and publish image
if: startsWith(github.ref, 'refs/tags/')
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: |
navicore/teams-notification-resource:${{ steps.prepare.outputs.tag_name }}
navicore/teams-notification-resource:latest