Skip to content

Commit

Permalink
matrix内でのsecretsの利用をやめる
Browse files Browse the repository at this point in the history
  • Loading branch information
nose221834 committed Jun 18, 2024
1 parent 53b48bc commit ce5fa81
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/image-push-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,22 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true ||
github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
github.event.action == 'reopened'
strategy:
matrix:
include:
- dockerfile: admin.k8s.Dockerfile
image_name: nutfes/group-manager-2-admin-view
vue_app_url: ''
vue_app_api_url: ''
imgur_id: ''
imgur_token: ''

- dockerfile: front.k8s.Dockerfile
image_name: nutfes/group-manager-2-user-front
vue_app_url: ${{ secrets.VUE_APP_URL }}
vue_app_api_url: ${{ secrets.VUE_APP_API_URL }}
imgur_id: ${{ secrets.NUXT_IMGUR_CLIENT_ID }}
imgur_token: ${{ secrets.NUXT_IMGUR_CLIENT_SECRET }}

- dockerfile: api.k8s.Dockerfile
image_name: nutfes/group-manager-2-api
vue_app_url: ${{ secrets.VUE_APP_URL }}
vue_app_api_url: ${{ secrets.VUE_APP_API_URL }}
imgur_id: ''
imgur_token: ''


steps:
- uses: actions/checkout@v4
Expand All @@ -55,8 +47,7 @@ jobs:
push: true
tags: ${{ matrix.image_name }}:latest
build-args: |
VUE_APP_URL=${{ matrix.vue_app_url }}
VUE_APP_API_URL=${{ matrix.vue_app_api_url }}
NUXT_IMGUR_CLIENT_ID=${{ matrix.imgur_id }}
NUXT_IMGUR_CLIENT_SECRET=${{ matrix.imgur_token }}
VUE_APP_URL=${{ secrets.VUE_APP_URL }}
VUE_APP_API_URL=${{ secrets.VUE_APP_API_URL }}
NUXT_IMGUR_CLIENT_ID=${{ secrets.NUXT_IMGUR_CLIENT_ID }}
NUXT_IMGUR_CLIENT_SECRET=${{ secrets.NUXT_IMGUR_CLIENT_SECRET }}

0 comments on commit ce5fa81

Please sign in to comment.