From fd0ebd1a6518b3b81f71c928a02903df655e5a74 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 3 Jan 2024 17:32:30 +0100 Subject: [PATCH] [CI] cascade release with end-to-end (cherry picked from commit ab37e03bf34800a7780a653e998ad6f7a97f08f4) (cherry picked from commit 2b527169f1f73574bcd5cb49e43ee87986f85996) (cherry picked from commit 5fed32742e62315e0b0f483563f6f3f3e57af0fa) (cherry picked from commit 861c05c2f308b0e7f4300b3f743830bb010588a3) --- .forgejo/cascading-release-end-to-end | 12 ++++++++++ .forgejo/workflows/build-release.yml | 33 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100755 .forgejo/cascading-release-end-to-end diff --git a/.forgejo/cascading-release-end-to-end b/.forgejo/cascading-release-end-to-end new file mode 100755 index 0000000000..7b43c89ed8 --- /dev/null +++ b/.forgejo/cascading-release-end-to-end @@ -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 diff --git a/.forgejo/workflows/build-release.yml b/.forgejo/workflows/build-release.yml index 4a196e1208..ab773f8579 100644 --- a/.forgejo/workflows/build-release.yml +++ b/.forgejo/workflows/build-release.yml @@ -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: scope read:user, write:repository, write:package +# +# secrets.CASCADE_ORIGIN_TOKEN: scope read:user, write:repository, write:issue +# secrets.CASCADE_DESTINATION_TOKEN: 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"