Skip to content

Commit

Permalink
Adjust SKIP_BUILDS
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenchristian1telus committed Oct 12, 2023
1 parent 6439e11 commit 3b28f9e
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,22 @@ jobs:
echo Deploy to Namespace: ${{ env.DEPLOY_NAMESPACE }}
echo URL: https://${{ env.APP_HOST_URL }}
echo "CLEAN_BUILDS: ${{ env.CLEAN_BUILDS }}"
echo "SKIP_BUILDS: $SKIP_BUILDS OR ${{ env.SKIP_BUILDS }}"
if [[ "${{ env.CLEAN_BUILDS }}" != "false" ]]; then
echo "CLEAN_BUILDS is not false, setting CLEAN_BUILDS_TEXT to TRUE"
echo CLEAN_BUILDS_TEXT="TRUE" >> $GITHUB_OUTPUT
else
echo "CLEAN_BUILDS is false, setting CLEAN_BUILDS_TEXT to FALSE"
echo CLEAN_BUILDS_TEXT="FALSE" >> $GITHUB_OUTPUT
fi
echo "SKIP_BUILDS: $SKIP_BUILDS OR ${{ env.SKIP_BUILDS }}"
if [[ $SKIP_BUILDS == "YES" ]]; then
echo "SKIP_BUILDS is TRUE, setting SKIP_BUILDS_TEXT to TRUE"
echo SKIP_BUILDS_TEXT="TRUE" >> $GITHUB_OUTPUT
else
echo "SKIP_BUILDS is FALSE, setting SKIP_BUILDS_TEXT to FALSE"
echo SKIP_BUILDS_TEXT="FALSE" >> $GITHUB_OUTPUT
fi
# Build PHP Image

build-images:
name: 🔨 Build Application Images (${{ github.ref_name }})
needs: [checkEnv]
runs-on: ubuntu-latest
if: ${{ needs.checkEnv.SKIP_BUILDS_TEXT != "YES" }} && (github.ref_name == 'dev' || github.ref_name == 'test' || github.ref_name == 'prod')
if: ${{ env.SKIP_BUILDS != 'YES' }} && (github.ref_name == 'dev' || github.ref_name == 'test' || github.ref_name == 'prod')
steps:
# Checkout the PR branch
- name: 📤 Checkout Target Branch
Expand All @@ -111,9 +104,9 @@ jobs:
keys-case: upper

# Build the PHP image
- name: 🚧 Build PHP (SKIP? ${{ needs.checkEnv.SKIP_BUILDS_TEXT }} OR ${{ env.SKIP_BUILDS }} OR $SKIP_BUILDS)
- name: 🚧 Build PHP (SKIP? ${{ env.SKIP_BUILDS }} OR $SKIP_BUILDS)
id: build-php
if: success() && ${{ needs.checkEnv.SKIP_BUILDS_TEXT == 'FALSE' }}
if: success() && ${{ env.SKIP_BUILDS == 'YES' }}
working-directory: "./"
run: |
echo "Building ${{ steps.dotenv.outputs.PHP_DEPLOYMENT_NAME }}:${{ env.BRANCH }}"
Expand All @@ -137,9 +130,9 @@ jobs:
CLEAN_BUILDS_TEXT: ${{ needs.checkEnv.outputs.CLEAN_BUILDS_TEXT }}

# Build the Cron image
- name: 🚧 Build Cron (SKIP? ${{ needs.checkEnv.SKIP_BUILDS_TEXT }})
- name: 🚧 Build Cron (SKIP? ${{ env.SKIP_BUILDS }})
id: build-cron
if: success() && ${{ needs.checkEnv.SKIP_BUILDS_TEXT == 'FALSE' }}
if: success() && ${{ env.SKIP_BUILDS == 'YES' }}
working-directory: "./"
run: |
echo "Building ${{ steps.dotenv.outputs.CRON_DEPLOYMENT_NAME }}:${{ env.BRANCH }}"
Expand Down

0 comments on commit 3b28f9e

Please sign in to comment.