From 8cf3096b30e8dbc5639e349fdaf928164d555958 Mon Sep 17 00:00:00 2001 From: Martin Buchleitner Date: Fri, 12 Jan 2024 09:52:40 +0100 Subject: [PATCH] feat: using vault secrets Signed-off-by: Martin Buchleitner --- .github/workflows/containers.yaml | 12 ++++++++---- dapr-distributed-calendar/README.md | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/containers.yaml b/.github/workflows/containers.yaml index a5808fc..2bcc0fa 100644 --- a/.github/workflows/containers.yaml +++ b/.github/workflows/containers.yaml @@ -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: @@ -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 @@ -70,8 +74,8 @@ 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 }} @@ -79,7 +83,7 @@ jobs: 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 diff --git a/dapr-distributed-calendar/README.md b/dapr-distributed-calendar/README.md index 78afadb..20777e4 100644 --- a/dapr-distributed-calendar/README.md +++ b/dapr-distributed-calendar/README.md @@ -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}`; ```