convert os.yml to forgejo
Some checks failed
os / build (push) Failing after 12s

This commit is contained in:
Anders da Silva Rytter Hansen 2026-05-02 11:08:15 -03:00
commit 2161f55efd

View file

@ -9,13 +9,13 @@ on:
- 'etc/**'
- 'usr/**'
- 'repo/**'
- '.github/workflows/os.yml'
- '.forgejo/workflows/os.yml'
- 'buildinstallxfce.sh'
- 'buildinstallxfceaddons.sh'
workflow_dispatch:
env:
REGISTRY: ghcr.io
REGISTRY: forge.pc-rytteren.dk
IMAGE_NAME: ${{ github.repository }}
jobs:
@ -30,7 +30,7 @@ jobs:
- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
run: echo "date=$(date +'%Y%m%d')" >> $FORGEJO_OUTPUT
- name: Checkout repository
uses: actions/checkout@v4
@ -47,24 +47,24 @@ jobs:
type=raw,value=${{ github.ref_name }}-10
type=raw,value=${{ github.ref_name }}-10.${{ steps.date.outputs.date }}
- name: Log into GHCR
- name: Log into Forgejo Container Registry
if: github.event_name != 'pull_request'
run: |
buildah login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
buildah login -u ${{ github.actor }} -p ${{ secrets.FORGEJO_TOKEN }} ${{ env.REGISTRY }}
- name: Build image with Buildah
id: build-image
run: |
# Vi bygger med 'raw-img' lokalt
buildah bud \
--label "org.opencontainers.image.source=https://github.com/${{ github.repository }}" \
--label "org.opencontainers.image.source=https://forge.pc-rytteren.dk/${{ github.repository }}" \
-t raw-img .
# Gem det primære tag til signering (vi tager det første fra listen)
PRIMARY_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n 1)
echo "primary_tag=$PRIMARY_TAG" >> $GITHUB_OUTPUT
echo "primary_tag=$PRIMARY_TAG" >> $FORGEJO_OUTPUT
- name: Push to GHCR
- name: Push to Forgejo Container Registry
if: github.event_name != 'pull_request'
run: |
for tag in $(echo "${{ steps.meta.outputs.tags }}"); do
@ -77,11 +77,10 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3.3.0
# VI TILFØJER LOGIN TIL COSIGN HER
- name: Log into GHCR (Cosign)
- name: Log into Forgejo Container Registry (Cosign)
if: github.event_name != 'pull_request'
run: |
cosign login ${{ env.REGISTRY }} -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
cosign login ${{ env.REGISTRY }} -u ${{ github.actor }} -p ${{ secrets.FORGEJO_TOKEN }}
- name: Sign image
if: github.event_name != 'pull_request'