Skip to content
This repository was archived by the owner on May 2, 2024. It is now read-only.

00 Protect Branch CI #114

00 Protect Branch CI

00 Protect Branch CI #114

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 }}'