3
0

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 3 years have passed since last update.

github-push-action@masterのデフォルトブランチがmainに変更された

Last updated at Posted at 2021-01-02

ad-m/github-push-action@masterとは

ad-m/github-push-action: GitHub actions to push back to repository eg. updated code

  • リモートリポジトリに変更点をPushをするGithub Actionsである。
  • GitHub Actionsで何かの処理をしたときリポジトリに変更が加わった場合、自動でPushさせることができる。

以前までPushするbranchのデフォルトがmasterだったが、mainに変更されたのでymlファイルも以下のように変更した。

action.yml
on:
  push:
    branches:
      - main # 修正

# snip...

    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        branch: main # 追記(デフォルトがmasterからmainになった)
  • デフォルトのbranchはmainであるが、今後変更される可能性があるので明示的に書いておく
  • まだmaster branchを使用している人はbranch: masterと修正すれば良い
3
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?