Skip to content

Commit

Permalink
Use secrets in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kilemensi committed Oct 3, 2024
1 parent d594b2c commit 7c16f06
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/charterafrica-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,17 @@ jobs:
NEXT_PUBLIC_APP_URL=${{ env.NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.CHARTERAFRICA_SENTRY_DSN }}
PAYLOAD_SECRET_KEY=${{ secrets.CHARTERAFRICA_PAYLOAD_SECRET_KEY }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.CHARTERAFRICA_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: charterafrica-runner
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
target: charterafrica-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/charterafrica-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,17 @@ jobs:
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.CHARTERAFRICA_SENTRY_DSN }}
NEXT_PUBLIC_SEO_DISABLED=${{ env.NEXT_PUBLIC_SEO_DISABLED }}
PAYLOAD_SECRET_KEY=${{ secrets.CHARTERAFRICA_PAYLOAD_SECRET_KEY }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.CHARTERAFRICA_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: charterafrica-runner
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"
target: charterafrica-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/civicsignalblog-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,16 @@ jobs:
NEXT_PUBLIC_APP_URL=${{ env.NEXT_PUBLIC_APP_URL }}
PAYLOAD_SECRET=${{ secrets.CIVICSIGNALBLOG_PAYLOAD_SECRET }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.CIVICSIGNALBLOG_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: civicsignalblog-runner
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"
target: civicsignalblog-runner

- name: Move cache
if: steps.version-check.outputs.changed == 'true'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/codeforafrica-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@ jobs:
PAYLOAD_SECRET=${{ secrets.CODEFORAFRICA_PAYLOAD_SECRET }}
NEXT_PUBLIC_APP_LOGO_URL=${{ secrets.NEXT_PUBLIC_CODEFORAFRICA_APP_LOGO_URL }}
NEXT_PUBLIC_APP_NAME=${{ secrets.NEXT_PUBLIC_CODEFORAFRICA_APP_NAME }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.CODEFORAFRICA_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: codeforafrica-runner
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
target: codeforafrica-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/codeforafrica-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,17 @@ jobs:
NEXT_PUBLIC_APP_NAME=${{ secrets.NEXT_PUBLIC_CODEFORAFRICA_APP_NAME }}
NEXT_PUBLIC_APP_URL=${{ env.NEXT_PUBLIC_APP_URL }}
PAYLOAD_SECRET=${{ secrets.CODEFORAFRICA_PAYLOAD_SECRET }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.CODEFORAFRICA_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: codeforafrica-runner
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"
target: codeforafrica-runner

- name: Move cache
if: steps.version-check.outputs.changed == 'true'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pesayetu-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,15 @@ jobs:
WORDPRESS_APPLICATION_PASSWORD=${{ secrets.PESAYETU_WORDPRESS_APPLICATION_PASSWORD }}
JWT_SECRET_KEY=${{ secrets.PESAYETU_JWT_SECRET_KEY }}
HURUMAP_API_URL=${{ secrets.PESAYETU_HURUMAP_API_URL }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.PESAYETU_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: pesayetu-runner
push: true
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
target: pesayetu-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/roboshield-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ jobs:
NEXT_PUBLIC_APP_URL=${{ env.NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.ROBOSHIELD_SENTRY_DSN }}
PAYLOAD_SECRET=${{ secrets.ROBOSHIELD_PAYLOAD_SECRET }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.ROBOSHIELD_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: roboshield-runner
file: Dockerfile
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
target: roboshield-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/roboshield-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ jobs:
NEXT_PUBLIC_APP_URL=${{ env.NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_SENTRY_DSN=${{ secrets.ROBOSHIELD_SENTRY_DSN }}
PAYLOAD_SECRET=${{ secrets.ROBOSHIELD_PAYLOAD_SECRET }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.ROBOSHIELD_SENTRY_PROJECT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: roboshield-runner
file: Dockerfile
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"
target: roboshield-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/techlabblog-deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Techlab Blog | Dev | Deploy
name: Techlab Blog | Deploy | DEV

on:
push:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/vpnmanager-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,18 @@ jobs:
with:
build-args: |
SENTRY_DSN=${{ secrets.VPNMANAGER_SENTRY_DSN }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ENVIRONMENT=${{ env.SENTRY_ENVIRONMENT }}
SENTRY_ORG=${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT=${{ secrets.VPNMANAGER_SENTRY_PROJECT }}
API_SECRET_KEY=${{ secrets.VPNMANAGER_API_SECRET_KEY }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
context: .
target: vpnmanager-runner
push: true
secrets: |
"sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}"
tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
target: vpnmanager-runner

# Temp fix
# https://github.com/docker/build-push-action/issues/252
Expand Down

0 comments on commit 7c16f06

Please sign in to comment.