Skip to content

fix: update BUILD condition in pr-deploy.yaml #9064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Aug 13, 2023
Prev Previous commit
Next Next commit
debug
  • Loading branch information
matifali committed Aug 13, 2023
commit 196f95a1305eb05d71c4a981dda13067c0ec6a3f
28 changes: 14 additions & 14 deletions .github/workflows/pr-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ jobs:
BUILD: |
${{
github.event.inputs.build == 'true' ||
(github.event_name == 'workflow_dispatch' && steps.check_deployment.outputs.NEW == 'true') ||
(
steps.check_deployment.outputs.NEW == 'false' &&
github.event_name == 'workflow_dispatch' &&
(
steps.filter.outputs.all_count > steps.filter.outputs.ignored_count ||
github.event_name == 'push'
steps.check_deployment.outputs.NEW == 'true' ||
steps.filter.outputs.all_count > steps.filter.outputs.ignored_count
)
) ||
(
steps.filter.outputs.all_count > steps.filter.outputs.ignored_count &&
github.event_name == 'push' &&
steps.check_deployment.outputs.NEW == 'false'
)
}}

Expand Down Expand Up @@ -166,18 +170,14 @@ jobs:
echo "Total number of changed files: ${{ steps.filter.outputs.all_count }}"
echo "Number of ignored files: ${{ steps.filter.outputs.ignored_count }}"

- name: Print job outputs
- name: Debug
run: |
set -euo pipefail
# Print all outputs of this job
echo "PR_NUMBER=${{ steps.pr_info.outputs.PR_NUMBER }}"
echo "PR_TITLE=${{ steps.pr_info.outputs.PR_TITLE }}"
echo "PR_URL=${{ steps.pr_info.outputs.PR_URL }}"
echo "CODER_BASE_IMAGE_TAG=${{ steps.set_tags.outputs.CODER_BASE_IMAGE_TAG }}"
echo "CODER_IMAGE_TAG=${{ steps.set_tags.outputs.CODER_IMAGE_TAG }}"
echo "NEW=${{ steps.check_deployment.outputs.NEW }}"
echo "BUILD=${{ github.event.inputs.build == 'true' || (github.event_name == 'workflow_dispatch' && steps.check_deployment.outputs.NEW == 'true') || ( steps.check_deployment.outputs.NEW == 'false' && ( steps.filter.outputs.all_count > steps.filter.outputs.ignored_count || github.event_name == 'push' )) }}"
echo "GITHUB_REF=${{ github.ref }}"
# Print all inputs of BUILD output
echo "build_input: ${{ github.event.inputs.build }}"
echo "github_event_name: ${{ github.event_name }}"
echo "files_changed: ${{ steps.filter.outputs.all_count > steps.filter.outputs.ignored_count }}"
echo "new_deployment: ${{ steps.check_deployment.outputs.NEW }}"

comment-pr:
needs: [check_pr, get_info]
Expand Down