-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'readme_workflows' into Suzu
- Loading branch information
Showing
5 changed files
with
3 additions
and
367 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,60 +10,12 @@ on: | |
- '.github/README_templates/**' | ||
- '.github/README_images/**' | ||
- '.github/workflows/generate_readme.yaml' | ||
workflow_call: | ||
inputs: | ||
repository-name: | ||
required: true | ||
type: string | ||
branch-name: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
generate-readme: | ||
name: Generate README | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Output env variables (push) | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
echo 'REPOSITORY_NAME=${{ github.repository }}' >> $GITHUB_ENV | ||
echo 'BRANCH_NAME=${{ github.ref_name }}' >> $GITHUB_ENV | ||
- name: Output env variables (workflow_call) | ||
if: ${{ github.event_name == 'workflow_call' }} | ||
run: | | ||
echo 'REPOSITORY_NAME=${{ inputs.repository-name }}' >> $GITHUB_ENV | ||
echo 'BRANCH_NAME=${{ inputs.branch-name }}' >> $GITHUB_ENV | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ env.BRANCH_NAME }} | ||
- name: Setup [email protected] | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20.8.0 | ||
cache: npm | ||
cache-dependency-path: './.github/readme_generator/package-lock.json' | ||
- name: Install script dependencies | ||
working-directory: ./.github/readme_generator | ||
run: npm install | ||
- name: Generate README | ||
working-directory: ./.github/readme_generator | ||
run: ./node_modules/.bin/ts-node ./readme_generator.ts ${{ env.REPOSITORY_NAME }} Gakuto1112/FiguraAvatarsReadmeTemplate main | ||
- id: check_diff | ||
name: Check diff | ||
continue-on-error: true | ||
run: | | ||
git add -N --all | ||
git diff --exit-code | ||
- name: Commit and push | ||
if: ${{ steps.check_diff.outcome == 'failure' }} | ||
run: | | ||
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} | ||
git config user.name github-actions[bot] | ||
git config user.email github-actions[bot]@users.noreply.github.com | ||
git add --all | ||
git commit -m '[GitHub Actions] ドキュメントの自動生成' -m '対象のコミット: ${{ github.sha }}' | ||
git push origin | ||
uses: Gakuto1112/FiguraAvatarsReadmeTemplate/.github/workflows/generate_my_figura_avatar_readme.yaml@main | ||
with: | ||
branch-name: ${{ github.ref_name }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
.luarc.json | ||
avatar.code-workspace | ||
.DS_Store | ||
.github/readme_generator/node_modules |