From ce5fa81bd0e7fc268ced2cf66d4dadae95e4fcd0 Mon Sep 17 00:00:00 2001 From: nose221834 Date: Wed, 19 Jun 2024 00:08:22 +0900 Subject: [PATCH] =?UTF-8?q?matrix=E5=86=85=E3=81=A7=E3=81=AEsecrets?= =?UTF-8?q?=E3=81=AE=E5=88=A9=E7=94=A8=E3=82=92=E3=82=84=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/image-push-stage.yml | 27 +++++++++----------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/image-push-stage.yml b/.github/workflows/image-push-stage.yml index f6a8076a4..e969617a8 100644 --- a/.github/workflows/image-push-stage.yml +++ b/.github/workflows/image-push-stage.yml @@ -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 @@ -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 }}