Skip to content

Commit 3fee07a

Browse files
committed
Test deployment to GitHub
1 parent c53a075 commit 3fee07a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/stage-3-build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ env:
3434
ENVIRONMENT_TAG: ${{ inputs.environment_tag }}
3535
PROJECT_NAME: ${{ inputs.project_name }}
3636
USE_AZURECR: ${{ secrets.ACR_NAME != '' }}
37+
IS_TEST_DEPLOY: true
3738

3839
jobs:
3940
containers-to-build:
@@ -74,6 +75,7 @@ jobs:
7475
GH_TOKEN: ${{ github.token }}
7576
run: |
7677
PR_NUMBER="${{ github.event.pull_request.number }}"
78+
7779
if [ -z "$PR_NUMBER" ]; then
7880
echo "Looking up PR number for commit: $GITHUB_SHA"
7981
PR_NUMBER=$(gh pr list --state open --search "$GITHUB_SHA" --json number -q '.[0].number' 2>/dev/null || true)
@@ -140,15 +142,15 @@ jobs:
140142
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
141143

142144
- name: ghcr.io login
143-
if: github.ref == 'refs/heads/main' && env.USE_AZURECR == 'false'
145+
if: github.ref == 'refs/heads/main' && env.USE_AZURECR == 'false' || env.IS_TEST_DEPLOY == 'true'
144146
uses: docker/login-action@v3
145147
with:
146148
registry: ghcr.io
147149
username: ${{ github.actor }}
148150
password: ${{ github.token }}
149151

150152
- name: Push Docker image
151-
if: github.ref == 'refs/heads/main'
153+
if: github.ref == 'refs/heads/main' || env.IS_TEST_DEPLOY == 'true'
152154
working-directory: ${{ steps.get-function-names.outputs.DOCKER_COMPOSE_DIR }}
153155
continue-on-error: false
154156
env:

0 commit comments

Comments
 (0)