Skip to content

Commit

Permalink
Workflow 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Jul 16, 2023
1 parent 4a492df commit f6ca194
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/build_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- name: Checkout master
uses: actions/checkout@v3
with:
fetch-depth: 2
ref: 'master'
path: master

Expand All @@ -40,21 +41,28 @@ jobs:
- name: Build index
run: python -B extensions/.github/scripts/build_index.py --build-branch extensions --deploy-branch master

- name: Get last commit message
id: last-commit-message
- name: Get last commit message - extensions
id: last-commit-message-extensions
run: echo "msg=$(git -C extensions log -1 --pretty=%s)" >> $GITHUB_OUTPUT

- name: Get last commit message - master
id: last-commit-message-master
run: echo "msg=$(git -C master log -1 --pretty=%s)" >> $GITHUB_OUTPUT

- name: Commit - master
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
commit_message: ${{ steps.last-commit-message-master.outputs.msg }}
commit_options: '--amend --no-edit'
file_pattern: '*.json'
push_options: '--force'
skip_fetch: true
repository: master

- name: Commit - extensions
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ steps.last-commit-message.outputs.msg }}
commit_message: ${{ steps.last-commit-message-extensions.outputs.msg }}
commit_options: '--amend --no-edit'
file_pattern: '*.json'
push_options: '--force'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/update_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ jobs:

- name: Update extension metadata
run: python -B extensions/.github/scripts/update_metadata.py --max-thread 20 --github-token ${{ secrets.GITHUB_TOKEN }} --deploy-branch master

- name: Get current date
id: current-date
run: echo "date=$(date -u +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Commit - master
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update metadata
commit_message: Update metadata ${{ steps.current-date.outputs.date }}
file_pattern: '*.json'
repository: master
4 changes: 2 additions & 2 deletions extension_template.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Extension Name",
"name": "Extension_Name",
"url": "https://github.com/<OWNER>/<REPO>.git",
"description": "Extension description",
"description": "Extension_Description",
"tags": [
"script",
"localization",
Expand Down

0 comments on commit f6ca194

Please sign in to comment.