This commit is contained in:
parent
d867d8913c
commit
2161f55efd
1 changed files with 10 additions and 11 deletions
|
|
@ -9,13 +9,13 @@ on:
|
||||||
- 'etc/**'
|
- 'etc/**'
|
||||||
- 'usr/**'
|
- 'usr/**'
|
||||||
- 'repo/**'
|
- 'repo/**'
|
||||||
- '.github/workflows/os.yml'
|
- '.forgejo/workflows/os.yml'
|
||||||
- 'buildinstallxfce.sh'
|
- 'buildinstallxfce.sh'
|
||||||
- 'buildinstallxfceaddons.sh'
|
- 'buildinstallxfceaddons.sh'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: forge.pc-rytteren.dk
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
id: date
|
id: date
|
||||||
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
|
run: echo "date=$(date +'%Y%m%d')" >> $FORGEJO_OUTPUT
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -47,24 +47,24 @@ jobs:
|
||||||
type=raw,value=${{ github.ref_name }}-10
|
type=raw,value=${{ github.ref_name }}-10
|
||||||
type=raw,value=${{ github.ref_name }}-10.${{ steps.date.outputs.date }}
|
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'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
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
|
- name: Build image with Buildah
|
||||||
id: build-image
|
id: build-image
|
||||||
run: |
|
run: |
|
||||||
# Vi bygger med 'raw-img' lokalt
|
# Vi bygger med 'raw-img' lokalt
|
||||||
buildah bud \
|
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 .
|
-t raw-img .
|
||||||
|
|
||||||
# Gem det primære tag til signering (vi tager det første fra listen)
|
# Gem det primære tag til signering (vi tager det første fra listen)
|
||||||
PRIMARY_TAG=$(echo "${{ steps.meta.outputs.tags }}" | head -n 1)
|
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'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
for tag in $(echo "${{ steps.meta.outputs.tags }}"); do
|
for tag in $(echo "${{ steps.meta.outputs.tags }}"); do
|
||||||
|
|
@ -77,11 +77,10 @@ jobs:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: sigstore/cosign-installer@v3.3.0
|
uses: sigstore/cosign-installer@v3.3.0
|
||||||
|
|
||||||
# VI TILFØJER LOGIN TIL COSIGN HER
|
- name: Log into Forgejo Container Registry (Cosign)
|
||||||
- name: Log into GHCR (Cosign)
|
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
run: |
|
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
|
- name: Sign image
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue