Use forgejo actions

This commit is contained in:
pazpi 2025-12-07 21:59:08 +01:00
parent 17cd87767c
commit d2375789ca

View file

@ -14,7 +14,7 @@ jobs:
hosts: ${{ steps.hosts.outputs.hosts }} hosts: ${{ steps.hosts.outputs.hosts }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: forgejo/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
@ -45,7 +45,7 @@ jobs:
- name: Upload flake.lock - name: Upload flake.lock
if: steps.changes.outputs.changed == 'true' if: steps.changes.outputs.changed == 'true'
uses: actions/upload-artifact@v4 uses: forgejo/upload-artifact@v4
with: with:
name: flake-lock name: flake-lock
path: flake.lock path: flake.lock
@ -61,10 +61,10 @@ jobs:
host: ${{ fromJson(needs.check-updates.outputs.hosts) }} host: ${{ fromJson(needs.check-updates.outputs.hosts) }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: forgejo/checkout@v4
- name: Download updated flake.lock - name: Download updated flake.lock
uses: actions/download-artifact@v4 uses: forgejo/download-artifact@v4
with: with:
name: flake-lock name: flake-lock
@ -77,7 +77,7 @@ jobs:
- name: Upload build log on failure - name: Upload build log on failure
if: failure() || steps.build.outcome == 'failure' if: failure() || steps.build.outcome == 'failure'
uses: actions/upload-artifact uses: forgejo/upload-artifact
with: with:
name: build-failure-${{ matrix.host }} name: build-failure-${{ matrix.host }}
path: build-output.txt path: build-output.txt
@ -96,7 +96,7 @@ jobs:
runs-on: nix runs-on: nix
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: forgejo/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
@ -106,13 +106,13 @@ jobs:
git config user.email "bot@noreply.local" git config user.email "bot@noreply.local"
- name: Download updated flake.lock - name: Download updated flake.lock
uses: actions/download-artifact@v4 uses: forgejo/download-artifact@v4
with: with:
name: flake-lock name: flake-lock
- name: Download failure artifacts - name: Download failure artifacts
if: needs.build.result == 'failure' if: needs.build.result == 'failure'
uses: actions/download-artifact@v4 uses: forgejo/download-artifact@v4
with: with:
pattern: build-failure-* pattern: build-failure-*
path: failures path: failures
@ -177,7 +177,7 @@ jobs:
FAILED_HOSTS="\n- (Unable to determine failed hosts - check workflow logs)" FAILED_HOSTS="\n- (Unable to determine failed hosts - check workflow logs)"
fi fi
ISSUE_BODY="Weekly flake update failed to build some hosts.\n\n**Branch:** \`${{ steps.branch.outputs.branch_name }}\`\n**Run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n\n**Failed hosts:**$FAILED_HOSTS\n$FAILURE_DETAILS\n\nGenerated on: $(date -Iseconds)" ISSUE_BODY="Weekly flake update failed to build some hosts.\n\n**Branch:** \`${{ steps.branch.outputs.branch_name }}\`\n**Run:** ${{ github.server_url }}/${{ github.repository }}/forgejo/runs/${{ github.run_id }}\n\n**Failed hosts:**$FAILED_HOSTS\n$FAILURE_DETAILS\n\nGenerated on: $(date -Iseconds)"
curl -X POST \ curl -X POST \
-H "Authorization: token $FORGEJO_TOKEN" \ -H "Authorization: token $FORGEJO_TOKEN" \