Repository navigation
feat: standalone pelican tests across accounts with shared sending #142
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Upstream Auto Release | ||
|
Check warning on line 1 in .github/workflows/upstream-auto-release.yml
|
||
| on: | ||
| pull_request_target: | ||
| types: [closed] | ||
| permissions: | ||
| actions: write | ||
| contents: write | ||
| issues: write | ||
| concurrency: | ||
| group: upstream-auto-release | ||
| cancel-in-progress: false | ||
| jobs: | ||
| tag: | ||
| if: >- | ||
| github.event.pull_request.merged == true && | ||
| startsWith(github.event.pull_request.head.ref, 'sync/upstream-') && | ||
| contains(github.event.pull_request.labels.*.name, 'upstream-safe-candidate') | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| steps: | ||
| - name: Resume the checked promotion pipeline | ||
| env: | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| set -euo pipefail | ||
| [[ "$PR_NUMBER" =~ ^[1-9][0-9]*$ ]] | ||
| gh workflow run upstream-promote.yml --repo "$GITHUB_REPOSITORY" --ref main \ | ||
| -f pr_number="$PR_NUMBER" -f confirmation=PROMOTE | ||
| - name: Create or update failure issue | ||
| if: failure() | ||
| env: | ||
| TITLE: Upstream automatic release failed | ||
| RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| gh label create --repo "$GITHUB_REPOSITORY" upstream-automation-failed --color B60205 --description 'Upstream automation stopped without production change' --force | ||
| body=$(mktemp) | ||
| printf 'Automatic tagging stopped. Production was not changed.\n\nRun: %s\n' "$RUN_URL" >"$body" | ||
| issue=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open --search "${TITLE} in:title" --json number,title --jq ".[] | select(.title == \"${TITLE}\") | .number" | head -n1) | ||
| if [[ -n "$issue" ]]; then | ||
| gh issue edit "$issue" --repo "$GITHUB_REPOSITORY" --body-file "$body" --add-label upstream-automation-failed | ||
| else | ||
| gh issue create --repo "$GITHUB_REPOSITORY" --title "$TITLE" --body-file "$body" --label upstream-automation-failed | ||
| fi | ||