This repository was archived by the owner on May 2, 2024. It is now read-only.
00 Protect Branch CI #119
This file contains 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: 00 Protect Branch CI | |
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
on: | |
schedule: | |
# https://crontab.guru | |
# Cache 切れ回避 | |
- cron: "0 02 * * 1,4" # daily 11:00 +0900 月,木 | |
pull_request: | |
types: | |
- closed | |
- opened | |
- reopened | |
- synchronize | |
- auto_merge_enabled | |
branches: | |
- 'main' | |
workflow_dispatch: {} | |
jobs: | |
changes: | |
name: Changes check | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 # default 6 hour | |
env: | |
TZ: Asia/Tokyo | |
outputs: | |
build-imagebuilder: ${{ steps.filter.outputs.build-imagebuilder }} | |
build-kernel: ${{ steps.filter.outputs.build-kernel }} | |
steps: | |
- name: Checkout from repository | |
uses: actions/[email protected] | |
- uses: dorny/[email protected] | |
id: filter | |
with: | |
filters: | | |
build-imagebuilder: | |
- '.github/workflows/build-imagebuilder.yml' | |
- 'config/imagebuilder/disable_services.txt' | |
- 'config/imagebuilder/files.txt' | |
- 'config/imagebuilder/packages_list.txt' | |
build-kernel: | |
- '.github/workflows/build-kernel.yml' | |
- 'config/mvebu-cortexa9-fortinet_fg-50e.ini' | |
build-kernel: | |
permissions: | |
actions: write | |
needs: | |
- changes | |
if: ${{ !cancelled() && !failure() && needs.changes.outputs.build-kernel == 'true' }} | |
uses: ./.github/workflows/build-kernel.yml | |
build-imagebuilder: | |
permissions: | |
actions: read | |
contents: write | |
needs: | |
- changes | |
- build-kernel | |
if: ${{ !cancelled() && !failure() && needs.changes.outputs.build-imagebuilder == 'true' && needs.changes.outputs.build-kernel == 'true' }} | |
uses: ./.github/workflows/build-imagebuilder.yml | |
with: | |
run-id: '${{ github.run_id }}' |