functions/.forgejo/workflows/functions.yml
Peter Kurfer 7fe53b6aa5
Some checks failed
functions / build (push) Failing after 1m24s
fix(ci): upsert app step
2025-01-17 11:54:46 +01:00

50 lines
1.5 KiB
YAML

name: functions
on:
- push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup `spin`
uses: fermyon/actions/spin/setup@v1
- name: Setup argocd CLI
run: |
curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-arm64
chmod +x /usr/local/bin/argocd
argocd version --client
- name: Setup Go 1.23.x
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Setup tinygo
uses: acifani/setup-tinygo@v2
with:
tinygo-version: "0.35.0"
install-binaryen: "false"
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: code.icb4dc0.de
username: prskr
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
spin registry push --build code.icb4dc0.de/infrastructure/functions/comics
working-directory: comics
- name: Upsert Argo App
run: |
argocd app create functions -f deploy/argo-app.yaml --upsert --server argo-cd-argocd-server.argo-system.svc --auth-token ${{ secrets.ARGOCD_TOKEN }} --plaintext
- name: Deploy KubeSpin apps
run: |
argocd app sync functions --server argo-cd-argocd-server.argo-system.svc --auth-token ${{ secrets.ARGOCD_TOKEN }} --plaintext --assumeYes