From f82840f1eafc155943f008ecd53cc10dcf00b9f1 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 13 Nov 2024 22:18:35 +0100 Subject: [PATCH] chore(ci): ROLE forgejo-coding & forgejo-testing When the CI vars.ROLE is forgejo-coding, it is assumed to be the repository where collaborative coding happens, i.e. https://codeberg.org/forgejo/forgejo When the CI vars.ROLE is forgejo-testing, it is assumed that only codebase testing is to be run and no other tests such as release build integration, label constraints, backporting etc. --- .forgejo/workflows/backport.yml | 2 +- .forgejo/workflows/build-release-integration.yml | 2 +- .forgejo/workflows/cascade-setup-end-to-end.yml | 2 +- .forgejo/workflows/merge-requirements.yml | 1 + .forgejo/workflows/release-notes-assistant-milestones.yml | 2 +- .forgejo/workflows/release-notes-assistant.yml | 2 +- .forgejo/workflows/renovate.yml | 2 +- .forgejo/workflows/testing.yml | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/backport.yml b/.forgejo/workflows/backport.yml index ba743247bc..f2b8520a9b 100644 --- a/.forgejo/workflows/backport.yml +++ b/.forgejo/workflows/backport.yml @@ -31,7 +31,7 @@ on: jobs: backporting: if: > - !startsWith(vars.ROLE, 'forgejo-') && ( + ( vars.ROLE == 'forgejo-coding' ) && ( github.event.pull_request.merged && contains(toJSON(github.event.pull_request.labels), 'backport/v') diff --git a/.forgejo/workflows/build-release-integration.yml b/.forgejo/workflows/build-release-integration.yml index f5f0d19da3..d10f40f7c7 100644 --- a/.forgejo/workflows/build-release-integration.yml +++ b/.forgejo/workflows/build-release-integration.yml @@ -22,7 +22,7 @@ on: jobs: release-simulation: - if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} + if: vars.ROLE == 'forgejo-coding' runs-on: self-hosted steps: - uses: actions/checkout@v4 diff --git a/.forgejo/workflows/cascade-setup-end-to-end.yml b/.forgejo/workflows/cascade-setup-end-to-end.yml index 3d5237cd00..6e380e7903 100644 --- a/.forgejo/workflows/cascade-setup-end-to-end.yml +++ b/.forgejo/workflows/cascade-setup-end-to-end.yml @@ -26,7 +26,7 @@ on: jobs: info: - if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} + if: vars.ROLE == 'forgejo-coding' runs-on: docker container: image: code.forgejo.org/oci/node:20-bookworm diff --git a/.forgejo/workflows/merge-requirements.yml b/.forgejo/workflows/merge-requirements.yml index d9650b66a7..7835825fec 100644 --- a/.forgejo/workflows/merge-requirements.yml +++ b/.forgejo/workflows/merge-requirements.yml @@ -13,6 +13,7 @@ on: jobs: merge-conditions: + if: vars.ROLE == 'forgejo-coding' runs-on: docker container: image: 'code.forgejo.org/oci/node:20-bookworm' diff --git a/.forgejo/workflows/release-notes-assistant-milestones.yml b/.forgejo/workflows/release-notes-assistant-milestones.yml index f2dfc807f5..000aef741e 100644 --- a/.forgejo/workflows/release-notes-assistant-milestones.yml +++ b/.forgejo/workflows/release-notes-assistant-milestones.yml @@ -6,7 +6,7 @@ on: jobs: release-notes: - if: ${{ !startsWith(vars.ROLE, 'forgejo-') + if: vars.ROLE == 'forgejo-coding' runs-on: docker container: image: 'code.forgejo.org/oci/node:20-bookworm' diff --git a/.forgejo/workflows/release-notes-assistant.yml b/.forgejo/workflows/release-notes-assistant.yml index 89ec2293e2..b1e2578fcf 100644 --- a/.forgejo/workflows/release-notes-assistant.yml +++ b/.forgejo/workflows/release-notes-assistant.yml @@ -7,7 +7,7 @@ on: jobs: release-notes: - if: ${{ !startsWith(vars.ROLE, 'forgejo-') && contains(github.event.pull_request.labels.*.name, 'worth a release-note') }} + if: ( vars.ROLE == 'forgejo-coding' ) && contains(github.event.pull_request.labels.*.name, 'worth a release-note') runs-on: docker container: image: 'code.forgejo.org/oci/node:20-bookworm' diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml index 0a5c4bdade..bb2fc5ff72 100644 --- a/.forgejo/workflows/renovate.yml +++ b/.forgejo/workflows/renovate.yml @@ -21,7 +21,7 @@ env: jobs: renovate: - if: ${{ secrets.RENOVATE_TOKEN != '' }} + if: vars.ROLE == 'forgejo-coding' && secrets.RENOVATE_TOKEN != '' runs-on: docker-runner-one container: diff --git a/.forgejo/workflows/testing.yml b/.forgejo/workflows/testing.yml index 03ebf0e983..b558d59590 100644 --- a/.forgejo/workflows/testing.yml +++ b/.forgejo/workflows/testing.yml @@ -10,7 +10,7 @@ on: jobs: backend-checks: - if: ${{ !startsWith(vars.ROLE, 'forgejo-') }} + if: vars.ROLE == 'forgejo-coding' || vars.ROLE == 'forgejo-testing' runs-on: docker container: image: 'code.forgejo.org/oci/node:20-bookworm'