Skip to content

Commit

Permalink
udpate build-number output
Browse files Browse the repository at this point in the history
  • Loading branch information
cru-Luis-Rodriguez committed Oct 25, 2024
1 parent 9ef3c37 commit d48ede9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-deploy-cloudrun-function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
build-number:
runs-on: ubuntu-latest
outputs:
build-number: ${{ steps.build-number.outputs.build-number }}
build-number: ${{ steps.verify-build-number.outputs.build-number }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -47,6 +47,7 @@ jobs:
run: echo "build-number=$(git rev-parse --short=7 ${{ github.sha }})" >> $GITHUB_OUTPUT

- name: Verify Build Number
id: verify-build-number
run: |
if [ -z "${{ steps.build-number.outputs.build-number }}" ]; then
echo "Build number is empty"
Expand Down Expand Up @@ -87,7 +88,7 @@ jobs:
GCP_REGION: ${{ secrets.GCP_REGION }}
run: |
gcloud config set project ${{ secrets.GCP_PROJECT_ID }}
gcloud functions deploy ${{ inputs.function_name }}-${{ needs.build.outputs.build-number }} \
gcloud functions deploy ${{ inputs.function_name }}-${{ needs.build-number.outputs.build-number }} \
--no-allow-unauthenticated \
--region $GCP_REGION \
--gen2 \
Expand Down

0 comments on commit d48ede9

Please sign in to comment.