Production #7852
Workflow file for this run
This file contains 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: Production | |
on: | |
push: | |
branches: | |
- main | |
merge_group: | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
any_src_changed: ${{ steps.src.outputs.any_changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check Source File Changes | |
uses: tj-actions/changed-files@v39 | |
id: src | |
with: | |
files_ignore: | | |
.github/** | |
**.md | |
benchmark/** | |
docker/** | |
scripts/setup/** | |
.devcontainer/** | |
- name: Output Source File Changes | |
run: | | |
if [[ "${{ steps.src.outputs.any_changed }}" == "true" ]]; then | |
echo "these src files changed:" >> $GITHUB_STEP_SUMMARY | |
for line in ${{ steps.src.outputs.all_changed_files }}; do | |
echo "- $line" >> $GITHUB_STEP_SUMMARY | |
done | |
else | |
echo "no src file changes detected" >> $GITHUB_STEP_SUMMARY | |
fi | |
linux: | |
needs: changes | |
if: needs.changes.outputs.any_src_changed == 'true' | |
uses: ./.github/workflows/reuse.linux.yml | |
secrets: inherit | |
with: | |
build_profile: release | |
runner_provider: aws | |
# macos: | |
# needs: linux | |
# uses: ./.github/workflows/reuse.macos.yml | |
# secrets: inherit | |
# with: | |
# build_profile: release | |
ready: | |
if: always() | |
runs-on: ubuntu-latest | |
needs: | |
- changes | |
- linux | |
steps: | |
- name: Check Ready to Merge | |
uses: actions/github-script@v7 | |
env: | |
SRC_CHANGED: ${{ needs.changes.outputs.any_src_changed }} | |
LINUX_BUILD_RESULT: ${{ needs.linux.result }} | |
with: | |
script: | | |
if (process.env.SRC_CHANGED == 'false') { | |
core.info('No source file changes detected, skipping'); | |
return; | |
} | |
if (process.env.LINUX_BUILD_RESULT == 'success') { | |
core.info('Linux build succeeded, ready to merge'); | |
return; | |
} | |
core.setFailed('Build failed, not ready to merge'); |