Skip to content

Release Staging

Release Staging #231

name: Release Staging
on:
workflow_run:
types: [completed]
workflows:
- Code Validation
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
concurrency:
group: release-staging
jobs:
print_conditions:
name: Show Workflow event
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7.0.1
with:
script: |
const github_context = JSON.parse(process.env['GITHUB_CONTEXT_FULL']);
console.log({
'github.event_name': github_context.event_name,
'github.event.workflow_run.conclusion': github_context.event?.workflow_run?.conclusion,
'github.ref': github_context.ref,
});
env:
GITHUB_CONTEXT_FULL: ${{ toJSON(github) }}
test_condition:
name: Test Condition
if: >
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.ref == 'refs/heads/main'
)
runs-on: ubuntu-latest
steps:
- run: echo 'Condition true'