CI formatのうち、hato-bot独自のものを分離する #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: pr-install-sudden-death-hato-bot | |
| # pull_requestで何かあった時に起動する | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - closed | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| pr-install-sudden-death-hato-bot: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| if: github.event_name != 'pull_request' || github.event.action != 'closed' | |
| with: | |
| # ここでsubmodule持ってくるとdetached headにcommitして死ぬ | |
| # submodule: 'recursive' | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Get uv version | |
| id: get_uv_version | |
| if: github.event_name != 'pull_request' || github.event.action != 'closed' | |
| run: echo "uv_version=$(sed -e 's/uv==//g' requirements.txt)" >> "$GITHUB_OUTPUT" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0 | |
| if: github.event_name != 'pull_request' || github.event.action != 'closed' | |
| with: | |
| version: ${{steps.get_uv_version.outputs.uv_version}} | |
| enable-cache: true | |
| - name: Install sudden-death | |
| id: install_sudden_death | |
| if: github.event_name != 'pull_request' || github.event.action != 'closed' | |
| run: bash "${GITHUB_WORKSPACE}/scripts/pr_install_sudden_death_hato_bot/pr_install_sudden_death_hato_bot/install_sudden_death.sh" | |
| - uses: dev-hato/actions-diff-pr-management@cc201e3df74a342983025c4e97b7216b4e77f9f1 # v2.0.0 | |
| if: success() || failure() | |
| with: | |
| github-token: ${{secrets.GITHUB_TOKEN}} | |
| branch-name-prefix: fix-install-sudden-death | |
| pr-title-prefix: formatが間違ってたので直してあげたよ! | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true |