Files
factorio-signal-exporter/.gitea/workflows/build.yml
Caesar2011 b90038ea4c
All checks were successful
Build & Push / build (push) Successful in 3m35s
Added chart version
2026-05-17 21:46:25 +02:00

63 lines
1.7 KiB
YAML

name: Build & Push
on:
push:
branches:
- main
env:
REGISTRY: git.sebse.de
IMAGE: git.sebse.de/sebse/factorio-signal-exporter
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=sha,prefix=,format=short
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./web
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.IMAGE }}:latest
cache-to: type=inline
- name: Package Helm chart
run: |
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
helm package web/charts/factorio-signal-exporter \
--version "0.0.0-${SHORT_SHA}" \
--app-version "${SHORT_SHA}"
- name: Push Helm chart to Gitea
run: |
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
curl -u ${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_TOKEN }} \
-X POST \
https://${{ env.REGISTRY }}/api/packages/sebse/helm/api/charts \
-F "chart=@factorio-signal-exporter-0.0.0-${SHORT_SHA}.tgz" \
--fail-with-body