Skip to content

Commit

Permalink
feat: using vault secrets
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Buchleitner <[email protected]>
  • Loading branch information
mabunixda committed Jan 12, 2024
1 parent caf7bff commit 8cf3096
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:

env:
platforms: linux/amd64

QUAY_USER: "${{ fromJSON(secrets.VAULT_KV_1D187965_OP_QUAY_ROBOT_ACCOUNT).username }}"
QUAY_TOKEN: "${{ fromJSON(secrets.VAULT_KV_1D187965_OP_QUAY_ROBOT_ACCOUNT).password }}"
BOT_ACCESS_TOKEN: "${{ fromJSON(secrets.VAULT_KV_1D187965_OP_GITHUB_INFRALOVERS).PAT }}"

jobs:
build:
Expand All @@ -32,7 +36,7 @@ jobs:
if [[ -n "${{ secrets.IMAGE_REPO }}" ]]; then
IMAGE_REPO="${{ secrets.IMAGE_REPO }}"
fi
QUAY_IMAGE="quay.io/$IMAGE_REPO/$IMAGE_NAME-${{ matrix.container }}"
QUAY_IMAGE="quay.io/${IMAGE_REPO}/${IMAGE_NAME}-${{ matrix.container }}"
GHCR_IMAGE="ghcr.io/${{ github.repository }}-${{ matrix.container }}"
VERSION="dev"
if [[ '${{ needs.prebuild.outputs.version }}' != '' ]]; then
Expand Down Expand Up @@ -70,16 +74,16 @@ jobs:
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}
username: ${{ env.QUAY_USER }}
password: ${{ env.QUAY_TOKEN }}

- name: Login to GitHub Container Registry
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.BOT_ACCESS_TOKEN }}
password: ${{ env.BOT_ACCESS_TOKEN }}

- name: Build and push
id: docker_build
Expand Down
2 changes: 2 additions & 0 deletions dapr-distributed-calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ I have tried to model this system on the Model View Controller Service (MVCS) ar
request( { uri: publishUrl, method: 'POST', json: JSON.stringify(message) } );
}
```
where the publish URL is:
```js
const publishUrl = `http://localhost:${daprPort}/v1.0/publish/${pubsub_name}/${topic}`;
```
Expand Down

0 comments on commit 8cf3096

Please sign in to comment.