From fcef092679b9e2039e787f88e0a5f2411d7a0cd5 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Tue, 20 Jun 2023 21:04:15 +0900 Subject: [PATCH 1/2] deploying: Use the same version of go as specified in go.mod --- .github/workflows/firebase-hosting-merge.yml | 5 +++-- .github/workflows/firebase-hosting-pull-request.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index d15d76e0..da4fae3c 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -17,9 +17,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v4 with: - go-version: '^1.17.8' + go-version-file: 'hashira-web/functions/go.mod' + cache-dependency-path: 'hashira-web/functions/go.sum' - run: yarn install - run: VITE_REVISION="Rev ${{ github.sha }} Build at `date`" yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 96ab7624..34ba4576 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -19,9 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v4 with: - go-version: '^1.17.8' + go-version-file: 'hashira-web/functions/go.mod' + cache-dependency-path: 'hashira-web/functions/go.sum' - run: yarn install - run: VITE_REVISION="Rev ${{ github.event.pull_request.head.sha }} Build at `date`" yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 From b1847aedd8f8254e7f22480e8994b1fefa144832 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Tue, 20 Jun 2023 21:07:08 +0900 Subject: [PATCH 2/2] Trigger staging action if the definition is changed --- .github/workflows/firebase-hosting-pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 34ba4576..18104953 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -7,6 +7,7 @@ on: pull_request: types: [opened, synchronize, reopened, labeled] paths: + - '.github/workflows/firebase-hosting-pull-request.yml' - 'hashira-web/**' defaults: