-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (36 loc) · 1.05 KB
/
docker.yaml
File metadata and controls
47 lines (36 loc) · 1.05 KB
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
---
name: CI Workflow
on: push
permissions:
contents: read
jobs:
docker-publish:
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
show-progress: false
- name: Log into registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
run: |
docker buildx build \
--no-cache \
--pull \
--tag ghcr.io/${GITHUB_REPOSITORY,,}:$(awk -F: '/FROM.*argocd/{print $2}' Dockerfile | cut -d '@' -f 1) \
.
- name: Docker Push
run: |
docker push ghcr.io/${GITHUB_REPOSITORY,,}:$(awk -F: '/FROM.*argocd/{print $2}' Dockerfile | cut -d '@' -f 1)
if: ${{ github.ref == 'refs/heads/master' }}
...