1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -05:00

[CI] cascade release with end-to-end

(cherry picked from commit ab37e03bf3)
(cherry picked from commit 2b527169f1)
(cherry picked from commit 5fed32742e)
(cherry picked from commit 861c05c2f3)
This commit is contained in:
Earl Warren 2024-01-03 17:32:30 +01:00
parent fe783424e1
commit fd0ebd1a65
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#!/bin/bash
set -ex
end_to_end=$1
end_to_end_pr=$2
forgejo=$3
forgejo_ref=$4
cd $end_to_end
date > last-upgrade
echo $FORGEJO_BINARY > forgejo/binary-url

View file

@ -1,3 +1,19 @@
#
# See also https://forgejo.org/docs/next/developer/RELEASE/#release-process
#
# https://codeberg.org/forgejo-integration/forgejo
#
# Builds a release from a codeberg.org/forgejo-integration tag
#
# vars.ROLE: forgejo-integration
#
# secrets.DOER: forgejo-experimental-ci
# secrets.TOKEN: <generated from codeberg.org/forgejo-experimental-ci> scope read:user, write:repository, write:package
#
# secrets.CASCADE_ORIGIN_TOKEN: <generated from codeberg.org/forgejo-experimental-ci> scope read:user, write:repository, write:issue
# secrets.CASCADE_DESTINATION_TOKEN: <generated from code.forgejo.org/forgejo-ci> scope read:user, write:repository, write:issue
# vars.CASCADE_DESTINATION_DOER: forgejo-ci
#
name: Build release
on:
@ -134,3 +150,20 @@ jobs:
suffix: -rootless
dockerfile: Dockerfile.rootless
verbose: ${{ vars.VERBOSE || 'false' }}
- name: end-to-end tests
if: ${{ secrets.TOKEN != '' }}
uses: https://code.forgejo.org/actions/cascading-pr@v1
with:
origin-url: ${{ env.GITHUB_SERVER_URL }}
origin-repo: ${{ github.repository }}
origin-token: ${{ secrets.CASCADE_ORIGIN_TOKEN }}
origin-ref: refs/heads/forgejo
destination-url: https://code.forgejo.org
destination-fork-repo: ${{ vars.CASCADE_DESTINATION_DOER }}/end-to-end
destination-repo: forgejo/end-to-end
destination-branch: forgejo-pr
destination-token: ${{ secrets.CASCADE_DESTINATION_TOKEN }}
update: .forgejo/cascading-release-end-to-end
env:
FORGEJO_BINARY: "${{ env.GITHUB_SERVER_URL }}/${{ github.repository }}/releases/download/v${{ steps.tag-version.outputs.value }}/forgejo-${{ steps.tag-version.outputs.value }}-linux-amd64"