Skip to content

Commit ca54f3a

Browse files
authored
update buildpack workflow example (#21)
<!-- Thank you for proposing a pull request! Please note that SOME TESTS WILL LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from forks. Someone from the team will review your Pull Request and respond. Please describe your change and any implementation details below. --> I've faced some errors and bugs when adapting the cloudrun-buildpacks.yml workflow for my buildpacks usecase. This PR aims to fix the bugs and update the actions used to their latest versions. * Update cloudrun-buildpacks.yml file to use the latest github actions * Setting up the buildpack using the official setup-tools & setup-packs github actions. * Fix the bugs in the pack publish commands
1 parent 24274f7 commit ca54f3a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

workflows/deploy-cloudrun/cloudrun-buildpacks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,20 @@ jobs:
111111
# password: ${{ secrets.GCP_CREDENTIALS }}
112112

113113
# BEGIN - Pack download, build and publish
114-
114+
- id: setup-tools
115+
uses: buildpacks/github-actions/[email protected]
116+
- id: setup-pack
117+
uses: buildpacks/github-actions/[email protected]
115118
# Build and publish image to Artifact Registry
116119
- name: Build and Publish with Buildpacks
117-
uses: buildpacks/github-actions/[email protected]
118120
run: |-
119121
pack config default-builder gcr.io/buildpacks.builder:v1
120-
pack build ${{ env.SOURCE_CODE_DIRECTORY }}
121-
pack --publish ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}
122-
122+
pack build ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }} --path=${{ env.SOURCE_DIRECTORY }} --publish
123123
# END - Docker auth, pack download, buildpack build and publish
124124

125125
- name: Deploy to Cloud Run
126126
id: deploy
127-
uses: google-github-actions/deploy-cloudrun@v0
127+
uses: google-github-actions/deploy-cloudrun@v2
128128
with:
129129
service: ${{ env.SERVICE }}
130130
region: ${{ env.REGION }}

0 commit comments

Comments
 (0)