LoginSignup
0
0

To use retry middleware with Faraday v2.0+, install `faraday-retry` gem というエラーの対応

Last updated at Posted at 2024-05-28

エラーが出ている状態

.github/workflows/git-pr-release.yml
name: git-pr-release

on:
  push:
    branches:
      - develop

jobs:
  git-pr-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # git-pr-release needs the git histories
      - uses: actions/setup-ruby@v1
        with:
          ruby-version: 3.1
      - run: gem install --no-document git-pr-release -v "2.2.0"
      - run: git-pr-release --no-fetch
        env:
          TZ: Asia/Tokyo
          GIT_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GIT_PR_RELEASE_BRANCH_PRODUCTION: main # 本番ブランチをを指定
          GIT_PR_RELEASE_BRANCH_STAGING: develop # ステージングのブランチを指定
          GIT_PR_RELEASE_TEMPLATE: .github/.git-pr-release

対応

以下を追加した

permissions:
  id-token: write
  contents: read
  pull-requests: write

動くやつ

.github/workflows/git-pr-release.yml
name: git-pr-release

on:
  push:
    branches:
      - develop

permissions:
  id-token: write
  contents: read
  pull-requests: write

jobs:
  git-pr-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # git-pr-release needs the git histories
      - uses: actions/setup-ruby@v1
        with:
          ruby-version: 3.1
      - run: gem install --no-document git-pr-release -v "2.2.0"
      - run: git-pr-release --no-fetch
        env:
          TZ: Asia/Tokyo
          GIT_PR_RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GIT_PR_RELEASE_BRANCH_PRODUCTION: main # 本番ブランチをを指定
          GIT_PR_RELEASE_BRANCH_STAGING: develop # ステージングのブランチを指定
          GIT_PR_RELEASE_TEMPLATE: .github/.git-pr-release

これで動くことは動く

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0