-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.17 KB
/
cd.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
32
33
34
35
36
37
38
39
40
41
42
43
44
---
name: CD
on:
pull_request:
branches:
- master
types: [closed]
push:
branches-ignore:
- master
jobs:
publish:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: fintlabsacr.azurecr.io/fint-altinn-download-queue-service
tags: |
type=ref,event=branch,suffix=-{{sha}}
type=ref,event=pr,suffix=-{{sha}}
type=sha,prefix={{date 'YYYY-MM-DD-'}},enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Login to ACR
uses: Azure/docker-login@v1
if: github.actor != 'dependabot[bot]'
with:
login-server: fintlabsacr.azurecr.io
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: ${{ github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}