Merge pull request 'merge actions test into end-to-end.sh' (#112) from twenty-panda/end-to-end:wip-actions into main

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/112
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
This commit is contained in:
earl-warren 2024-03-20 13:18:28 +00:00
commit b8c71e7201
21 changed files with 235 additions and 269 deletions

View file

@ -1,3 +1,18 @@
#
#
# https://code.forgejo.org/forgejo/end-to-end/settings/actions
#
# secrets.CASCADE_DOCS_ORIGIN_TOKEN
# https://code.forgejo.org/forgejo-ci scope write:issue, read:repository, read:user
# vars.CASCADE_DOCS_DESTINATION_DOER
# forgejo-cascading-pr (https://codeberg.org/forgejo-cascading-pr)
# secrets.CASCADE_DOCS_DESTINATION_TOKEN
# https://codeberg.org/forgejo-cascading-pr scope write:issue, write:repository, read:user
# vars.CASCADE_DOCS_FORCE_VERSION
# replace the generated documentation for a given version even if it has already
# been generated (e.g. v7.0.0-test)
#
on:
pull_request:
push:
@ -50,6 +65,57 @@ jobs:
if: always()
run: su forgejo -c "./end-to-end.sh show_logs"
actions:
needs: [build]
runs-on: lxc-bookworm
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/prepare-end-to-end
- run: su forgejo -c "./end-to-end.sh test_actions"
actions-docs:
needs: [build]
runs-on: lxc-bookworm
if: github.ref == 'refs/heads/main'
strategy:
matrix:
info:
- version: 7.0
branch: next
forgejo: https://codeberg.org
repo: forgejo-experimental/forgejo
- version: 1.21
forgejo: https://codeberg.org
repo: forgejo/forgejo
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- uses: ./.forgejo/prepare-end-to-end
- name: set full-version
id: full-version
shell: bash
run: |
set -x
full_version=$(./end-to-end.sh full_version ${{ matrix.info.version }})
echo value="$full_version" >> $GITHUB_OUTPUT
- run: su forgejo -c "./end-to-end.sh test_actions ${{ matrix.info.version }}"
- name: update documentation
uses: https://code.forgejo.org/actions/cascading-pr@v1
with:
origin-url: ${{ env.GITHUB_SERVER_URL }}
origin-repo: ${{ github.repository }}
origin-token: ${{ secrets.CASCADE_DOCS_ORIGIN_TOKEN }}
origin-ref: refs/heads/main
destination-url: https://codeberg.org
destination-fork-repo: ${{ vars.CASCADE_DOCS_DESTINATION_DOER }}/docs
destination-repo: forgejo/docs
destination-branch: ${{ matrix.info.branch || format('v{0}', matrix.info.version) }}
destination-token: ${{ secrets.CASCADE_DOCS_DESTINATION_TOKEN }}
prefix: ${{ env.GITHUB_REPOSITORY }}-${{ matrix.info.version }}
update: .forgejo/cascading-docs
env:
FORCE_VERSION: "${{ vars.CASCADE_DOCS_FORCE_VERSION }}"
VERSION: "${{ steps.full-version.outputs.value }}"
upgrade:
name: upgrade and storage
needs: [build]