Skip to content

this isn't worth it #31

this isn't worth it

this isn't worth it #31

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yaml

Invalid workflow file

(Line: 49, Col: 14): Unrecognized function: 'always'. Located at position 1 within expression: always() && (needs.build.result == 'failure' || needs.check.result == 'failure' || needs.release.result == 'failure') && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing')
permissions:
contents: read
issues: write
on:
push:
branches: ['master', 'next']
pull_request:
branches: ['*']
jobs:
build:
uses: ./.github/workflows/build.yaml
check:
needs: build
uses: ./.github/workflows/check.yaml
release:
# TODO: remove 'testing-oidc-trusted-publishing' branch once trusted publishing is stable
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing' || github.ref == 'refs/heads/next')
needs: [build, check]
permissions:
contents: write
id-token: write
actions: read
uses: ./.github/workflows/release.yaml
notify-failure:
# TODO remove 'testing-oidc-trusted-publishing' github issue reporting is stable
if: always() && (needs.build.result == 'failure' || needs.check.result == 'failure' || needs.release.result == 'failure') && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing')
needs: [build, check, release]
permissions:
contents: read
issues: write
uses: ./.github/workflows/failure-notification.yaml
with:
workflow_name: "Main CI Pipeline"
job_name: ${{ needs.build.result == 'failure' && 'build' || needs.check.result == 'failure' && 'check' || needs.release.result == 'failure' && 'release' || 'unknown' }}
failure_reason: "One or more jobs in the main CI pipeline failed. Check the workflow run for detailed error information."
debug-context:
if: always()
needs: [build, check, release]
runs-on: ubuntu-latest
steps:
- name: Debug conditional values
run: |
echo "=== Debug Information ==="
echo "github.event_name: ${{ github.event_name }}"
echo "github.ref: ${{ github.ref }}"
echo "build result: ${{ needs.build.result }}"
echo "check result: ${{ needs.check.result }}"
echo "release result: ${{ needs.release.result }}"
echo ""
echo "=== Condition Evaluation ==="
echo "always(): true (by definition)"
echo "build failed: ${{ needs.build.result == 'failure' }}"
echo "check failed: ${{ needs.check.result == 'failure' }}"
echo "release failed: ${{ needs.release.result == 'failure' }}"
echo "any job failed: ${{ needs.build.result == 'failure' || needs.check.result == 'failure' || needs.release.result == 'failure' }}"
echo "is push event: ${{ github.event_name == 'push' }}"
echo "is master branch: ${{ github.ref == 'refs/heads/master' }}"
echo "is testing branch: ${{ github.ref == 'refs/heads/testing-oidc-trusted-publishing' }}"
echo "is allowed branch: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing' }}"
echo ""
echo "=== Full condition would be ==="
echo "Result: ${{ always() && (needs.build.result == 'failure' || needs.check.result == 'failure' || needs.release.result == 'failure') && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/testing-oidc-trusted-publishing') }}"