argo-crypt/.github/workflows/docker.yaml

46 lines
845 B
YAML
Raw Normal View History

2024-09-16 17:52:25 +00:00
---
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@v4
with:
show-progress: false
- name: Log into registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2024-09-16 19:29:34 +00:00
- name: Docker Build & Push
2024-09-16 17:52:25 +00:00
run: |
2024-09-16 19:29:34 +00:00
tag=$(awk -F: '/FROM.*argocd/{ print $2 }' Dockerfile)
2024-09-16 17:52:25 +00:00
docker buildx build \
--no-cache \
--pull \
2024-09-16 19:29:34 +00:00
--tag ghcr.io/${GITHUB_REPOSITORY,,}:${tag} \
2024-09-16 17:52:25 +00:00
.
2024-09-16 19:29:34 +00:00
docker push ghcr.io/${GITHUB_REPOSITORY,,}:${tag}
2024-09-16 17:52:25 +00:00
...