Move CI script from ci to tools/ci

This commit is contained in:
Taiki Endo
2023-07-19 03:21:43 +09:00
parent c8da22002b
commit d7346df193
2 changed files with 3 additions and 4 deletions

View File

@@ -180,10 +180,8 @@ jobs:
- run: tools/manifest.sh - run: tools/manifest.sh
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git add -N . && git diff --exit-code
if: github.repository_owner != 'taiki-e' || github.event_name != 'schedule' && !(github.event_name == 'push' && github.ref == 'refs/heads/main')
- id: diff - id: diff
run: ci/manifest.sh run: tools/ci/manifest.sh
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
- uses: peter-evans/create-pull-request@v5 - uses: peter-evans/create-pull-request@v5
with: with:
@@ -193,3 +191,4 @@ jobs:
branch: update-manifest branch: update-manifest
token: ${{ secrets.CREATE_PR_TOKEN }} token: ${{ secrets.CREATE_PR_TOKEN }}
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
- run: git add -N . && git diff --exit-code

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT # SPDX-License-Identifier: Apache-2.0 OR MIT
set -euxo pipefail set -euxo pipefail
IFS=$'\n\t' IFS=$'\n\t'
cd "$(dirname "$0")"/.. cd "$(dirname "$0")"/../..
bail() { bail() {
echo >&2 "error: $*" echo >&2 "error: $*"