Skip to content

fix: permissions

fix: permissions #23

name: '内部レポジトリへの同期'
on:
push:
branches: [ gh-pages ]
workflow_dispatch:
jobs:
sync:
if: github.repository == 'gsi-cyberjapan/gsimaps'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: public
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SYNC_GITHUB_TOKEN }}
repository: gsimaps-cicd/gsimaps-internal
path: private
- name: 内部リポジトリのプルリクエストを用意する
run: |
cd private
git remote add public ../public
git fetch public
git reset --hard public/gh-pages
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.SYNC_GITHUB_TOKEN }}
path: private
title: 'Sync'
body: 'Sync'
branch: 'gsimaps-sync'
base: 'gh-pages'