sync-awf-upstream #174
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: sync-awf-upstream | |
on: | |
workflow_dispatch: | |
inputs: | |
target_branch: | |
description: Target branch | |
required: true | |
type: string | |
jobs: | |
sync-awf-upstream: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate token | |
id: generate-token | |
uses: tibdex/github-app-token@v1 | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
private_key: ${{ secrets.PRIVATE_KEY }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install @holiday-jp/holiday_jp | |
- uses: actions/github-script@v6 | |
id: is-holiday | |
with: | |
script: | | |
const holiday_jp = require(`${process.env.GITHUB_WORKSPACE}/node_modules/@holiday-jp/holiday_jp`) | |
core.setOutput('holiday', holiday_jp.isHoliday(new Date())); | |
- name: Print warning for invalid branch name | |
if: ${{ inputs.target_branch == 'tier4/main' }} | |
run: | | |
echo This action cannot be performed on 'tier4/main' branch | |
- name: Run sync-branches | |
uses: autowarefoundation/autoware-github-actions/sync-branches@v1 | |
if: ${{ inputs.target_branch != 'tier4/main' }} | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
base-branch: ${{ inputs.target_branch }} | |
sync-pr-branch: sync-awf-upstream | |
sync-target-repository: https://github.com/tier4/autoware_launch.git | |
sync-target-branch: awf-latest | |
pr-title: "chore: sync tier4/autoware_launch:awf-latest" | |
pr-labels: | | |
bot | |
sync-awf-upstream | |
auto-merge-method: merge |