Skip to content

Commit

Permalink
use CR_PAT for GCR stuffs, with write permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorsector committed Jul 9, 2024
1 parent 72403c2 commit 6d57cf3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/steps/2-setup-azure-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ We won't be going into detail on the steps of this workflow, but it would be a g
with:
registry: ${{ env.IMAGE_REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.CR_PAT }}
- name: Extract metadata (tags, labels) for Docker
id: meta
Expand Down Expand Up @@ -154,7 +154,7 @@ We won't be going into detail on the steps of this workflow, but it would be a g
with:
login-server: ${{env.IMAGE_REGISTRY_URL}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.CR_PAT }}
- name: Deploy web app container
uses: azure/webapps-deploy@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/steps/3-spinup-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Through the power of GitHub Actions, we can create, configure, and destroy these
Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub. We will use a PAT to allow your web app to pull the container image after your workflow pushes a newly built image to the registry.

1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
2. Create a personal access token with the `repo` and `read:packages` scopes. For more information, see ["Creating a personal access token."](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
2. Create a personal access token with the `repo` and `write:packages` scopes. For more information, see ["Creating a personal access token."](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
3. Once you have generated the token we will need to store it in a secret so that it can be used within a workflow. Create a new repository secret named `CR_PAT` and paste the PAT token in as the value.
4. With this done we can move on to setting up our workflow.

Expand Down
4 changes: 2 additions & 2 deletions .github/steps/5-deploy-to-prod-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
with:
registry: ${{ env.IMAGE_REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.CR_PAT }}

- name: Extract metadata (tags, labels) for Docker
id: meta
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
with:
login-server: ${{env.IMAGE_REGISTRY_URL}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.CR_PAT }}

- name: Deploy web app container
uses: azure/webapps-deploy@v3
Expand Down

0 comments on commit 6d57cf3

Please sign in to comment.