From e081e0ee702e7257eb49a7e7097e737c424eae6a Mon Sep 17 00:00:00 2001 From: ayuki_j <19406594+ayuki-joto@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:31:07 +0900 Subject: [PATCH] refactor: change env --- .github/workflows/_check.yaml | 22 ++++++++++------------ .github/workflows/branch.yaml | 2 -- .github/workflows/main.yaml | 2 -- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/_check.yaml b/.github/workflows/_check.yaml index 1d6e9fef2..c1eb1976a 100644 --- a/.github/workflows/_check.yaml +++ b/.github/workflows/_check.yaml @@ -7,19 +7,8 @@ on: type: string required: false default: 3.0.6 - secrets: - github-token: - required: true -env: - DB_HOSTNAME: 127.0.0.1 - DATABASE_PORT: 5432 - DB_USERNAME: postgres - DB_PASSWORD: postgres - RAILS_ENV: test - IMAGEMAGICK_SRC: 7.1.0-50.tar.gz - SLACK_API_TOKEN: xoxb-dummy - SLACK_MESSAGE_CHANNEL: '#test' +permissions: write-all jobs: rubocop: @@ -45,6 +34,15 @@ jobs: unittest: name: Unit Test runs-on: ubuntu-latest + env: + DB_HOSTNAME: 127.0.0.1 + DATABASE_PORT: 5432 + DB_USERNAME: postgres + DB_PASSWORD: postgres + RAILS_ENV: test + IMAGEMAGICK_SRC: 7.1.0-50.tar.gz + SLACK_API_TOKEN: xoxb-dummy + SLACK_MESSAGE_CHANNEL: '#test' services: db: image: postgres:12.14 diff --git a/.github/workflows/branch.yaml b/.github/workflows/branch.yaml index 34f7c9003..5bf79b318 100644 --- a/.github/workflows/branch.yaml +++ b/.github/workflows/branch.yaml @@ -10,5 +10,3 @@ jobs: check: name: Check uses: ./.github/workflows/_check.yaml - secrets: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e7bc10000..5cc855df4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -11,8 +11,6 @@ jobs: check: name: Check uses: ./.github/workflows/_check.yaml - secrets: - github-token: ${{ secrets.GITHUB_TOKEN }} release: uses: ./.github/workflows/_release.yaml