8
5

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.

master への push 時に生成物を git push する

Last updated at Posted at 2020-03-30

やりたいこと

  • ビルド生成物を CI に生成させたい

方法

Github Actions で secrets.GITHUB_TOKEN を使って 自身に push する

追記: set-url はいらず、自分自身に push するだけでOK

workflow

.github/workflows/gen.yaml
name: Gen
on:
  push:
    branches:
      - master

jobs:
  build:
    name: Gen dump
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - run: echo 1 > .dump
      - run: git add .dump
      - run: git config --global user.email "CI@example"
      - run: git config --global user.name "CI"
      - run: git commit -m "Gen .dump"
      - run: git push origin master

無限ループはしない模様

参考: https://beet-aizu.hatenablog.com/entry/2019/09/05/190123

8
5
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
8
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?