3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GitHub Actionsでbitrise.ymlを追跡可能にする

Posted at

GitHub Actionsでbitrise.ymlをダウンロードしてPRを作る

bitrise.ymlを追跡可能にする

Bitriseはワークフローエディターがよくできているので、基本WebインターフェースでWorkflow作っています

が、変更履歴がわからなかったり設定ファイルはGitで管理したいです。
しかしbitrise.ymlをワークフローで使うには制約があったり、いろいろと大変なのであまりやりたくない。

そこで、bitriseからダウンロードしてきてGitに反映させる方法を取ります。

FastfileとBitriseで動かしてるやつはあったから、GitHub Actionsでやってみる

準備するもの

Github Actions

.github/workflows/sync_bitrise.yml
name: sync_bitrise

on:
  schedule:
    # 平日前の2時に実行(UTC)
    - cron: "0 17 * * 0-4"

jobs:
  sync:
    runs-on: ubuntu-latest

    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - uses: actions/checkout@v2

    - name: Download bitrise.yml
      run: |
        curl -O 'https://api.bitrise.io/v0.1/apps/${{ secrets.BITRISE_APP_SLUG }}/bitrise.yml' -H 'Authorization: ${{ secrets.BITRISE_ACCESS_TOKEN }}'
      shell: bash

    - name: Create pull request
      uses: peter-evans/create-pull-request@v2
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        commit-message: Sync bitrise.yml
        branch: ci/sync-bitrise
        branch-suffix: timestamp

参考

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?