-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.84 KB
/
build-and-scan-private.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
47
48
49
50
51
52
53
54
55
56
on:
push:
paths:
- 'docker/**'
- '.github/workflows/*private.yml'
schedule:
- cron: '0 2 1/14 * *'
name: private-build-scan-and-push
jobs:
build-scan-and-push-main:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
--build-arg VCS_REF=${{ github.sha }}
--tag registry.aves-it.nl/automx/automx2:${{ github.sha }}
--tag registry.aves-it.nl/automx/automx2:latest
docker/
- uses: Azure/container-scan@v0
with:
image-name: registry.aves-it.nl/automx/automx2:${{ github.sha }}
- uses: Azure/docker-login@v1
with:
login-server: registry.aves-it.nl
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: docker push registry.aves-it.nl/automx/automx2
build-scan-and-push-branch:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
--build-arg VCS_REF=${{ github.sha }}
--tag registry.aves-it.nl/automx/automx2:${{ github.sha }}
--tag registry.aves-it.nl/automx/automx2:${GITHUB_REF##*/}
docker/
- uses: Azure/container-scan@v0
with:
image-name: registry.aves-it.nl/automx/automx2:${{ github.sha }}
- uses: Azure/docker-login@v1
with:
login-server: registry.aves-it.nl
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: docker push registry.aves-it.nl/automx/automx2