images/.forgejo/workflows/argco_cd.yaml

42 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-04-26 06:41:21 +00:00
---
name: Image builds
on:
2024-05-18 17:13:41 +00:00
schedule:
- cron: "21 2 * * *"
2024-04-26 06:41:21 +00:00
push:
branches:
- main
2024-05-18 17:13:41 +00:00
paths:
- ".forgejo/workflows/argo_cd.yaml"
- "argocd/**"
2024-04-26 06:41:21 +00:00
jobs:
build-argo-cd-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: code.icb4dc0.de
username: prskr
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
2024-05-18 17:13:41 +00:00
- name: Check latest ArgoCD tag
run: |
echo "ARGOCD_VERSION=$(gh release list -R argoproj/argo-cd --exclude-pre-releases --exclude-drafts --json 'tagName' --jq '.[].tagName' --limit 10 | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr | head -n 1)" >> "$GITHUB_ENV"
2024-05-18 17:13:41 +00:00
env:
GH_TOKEN: ${{ secrets.RENOVATE_GITHUB_TOKEN }}
2024-04-26 06:41:21 +00:00
- name: Build and push
uses: docker/build-push-action@v6
2024-04-26 06:41:21 +00:00
with:
context: "./argocd"
push: true
2024-05-18 17:13:41 +00:00
tags: code.icb4dc0.de/infrastructure/images/argocd:${{ env.ARGOCD_VERSION }}
2024-04-26 06:41:21 +00:00
build-args: |
2024-05-18 17:13:41 +00:00
BASE_IMAGE=quay.io/argoproj/argocd:${{ env.ARGOCD_VERSION }}