Merge pull request 'fix(ci): only trigger end-to-end tests when the label is set' (#5896) from earl-warren/forgejo:wip-label-end-to-end into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5896 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
542a9d2529
1 changed files with 6 additions and 5 deletions
|
@ -12,8 +12,10 @@
|
||||||
# whatever is in the default branch instead
|
# whatever is in the default branch instead
|
||||||
#
|
#
|
||||||
# - after it is merged, double check it works by setting the
|
# - after it is merged, double check it works by setting the
|
||||||
# run-end-to-end-test on a pull request (any pull request will doe
|
# run-end-to-end-test on a pull request (any pull request will do)
|
||||||
#
|
#
|
||||||
|
name: end-to-end
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -33,10 +35,9 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo github.event.pull_request.head.repo.fork = ${{ github.event.pull_request.head.repo.fork }}
|
echo github.event.pull_request.head.repo.fork = ${{ github.event.pull_request.head.repo.fork }}
|
||||||
echo github.event.action = ${{ github.event.action }}
|
echo github.event.action = ${{ github.event.action }}
|
||||||
echo github.event.pull_request.merged = ${{ github.event.pull_request.merged }}
|
echo github.event.label
|
||||||
echo github.event.pull_request.labels.*.name
|
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
${{ toJSON(github.event.pull_request.labels.*.name) }}
|
${{ toJSON(github.event.label) }}
|
||||||
EOF
|
EOF
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
${{ toJSON(github.event) }}
|
${{ toJSON(github.event) }}
|
||||||
|
@ -47,7 +48,7 @@ jobs:
|
||||||
!startsWith(vars.ROLE, 'forgejo-') && (
|
!startsWith(vars.ROLE, 'forgejo-') && (
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
(
|
(
|
||||||
github.event.action == 'label_updated' && contains(github.event.pull_request.labels.*.name, 'run-end-to-end-tests')
|
github.event.action == 'label_updated' && github.event.label.name == 'run-end-to-end-tests'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|
Loading…
Reference in a new issue