chore: Update create-theme workflow to use environment variables for theme creation

This commit is contained in:
Mauro Balades 2024-08-15 21:09:14 +02:00
parent 91fe85d16a
commit a1770acbc0

View file

@ -32,12 +32,12 @@ jobs:
- name: Export parsed payload into variables - name: Export parsed payload into variables
id: export id: export
run: | run: |
echo "THEME_NAME='${{ fromJson(steps.parse.outputs.payload)['Name'] }}'" >> $GITHUB_ENV echo 'THEME_NAME=${{ fromJson(steps.parse.outputs.payload)['Name'] }}' >> $GITHUB_ENV
echo "THEME_DESCRIPTION='${{ fromJson(steps.parse.outputs.payload)['Description'] }}'" >> $GITHUB_ENV echo 'THEME_DESCRIPTION=${{ fromJson(steps.parse.outputs.payload)['Description'] }}' >> $GITHUB_ENV
echo "THEME_HOMEPAGE='${{ fromJson(steps.parse.outputs.payload)['Homepage'] }}'" >> $GITHUB_ENV echo 'THEME_HOMEPAGE=${{ fromJson(steps.parse.outputs.payload)['Homepage'] }}' >> $GITHUB_ENV
echo "THEME_STYLES='${{ fromJson(steps.parse.outputs.payload)['Theme Styles'] }}'" >> $GITHUB_ENV echo 'THEME_STYLES=${{ fromJson(steps.parse.outputs.payload)['Theme Styles'] }}' >> $GITHUB_ENV
echo "THEME_README='${{ fromJson(steps.parse.outputs.payload)['Readme'] }}'" >> $GITHUB_ENV echo 'THEME_README=${{ fromJson(steps.parse.outputs.payload)['Readme'] }}' >> $GITHUB_ENV
echo "THEME_AUTHOR='${{ github.actor }}'" >> $GITHUB_ENV echo 'THEME_AUTHOR=${{ github.actor }}' >> $GITHUB_ENV
- name: Setup Git - name: Setup Git
run: | run: |
@ -47,12 +47,12 @@ jobs:
- name: Create theme content - name: Create theme content
run: | run: |
python3 scripts/submit-theme.py \ python3 scripts/submit-theme.py \
--name "${THEME_NAME}" \ --name "${{ env.THEME_NAME }}" \
--description "${THEME_DESCRIPTION}" \ --description "${{ env.THEME_DESCRIPTION }}" \
--homepage "${THEME_HOMEPAGE}" \ --homepage "${{ env.THEME_HOMEPAGE }}" \
--styles "${THEME_STYLES}" \ --styles "${{ env.THEME_STYLES }}" \
--readme "${THEME_README}" \ --readme "${{ env.THEME_README }}" 2> error.log
--author "${THEME_AUTHOR}" 2> error.log continue-on-error: true
- name: Export creation output - name: Export creation output
if: failure() if: failure()
@ -106,7 +106,7 @@ jobs:
Your theme has been successfully submitted. The maintainers will review it and get back to you soon. Your theme has been successfully submitted. The maintainers will review it and get back to you soon.
Here are some details about your submission: Here are some details about your submission:
* Your theme has been requested into [this PR](https://github.com/zen-browser/theme-store/pull/${{ steps.createPR.outputs.pull-request-url }})! * Your theme has been requested into [this PR](https://github.com/zen-browser/theme-store/pull/${{ env.PULL_REQUEST_NUMBER }}).
* It has been created into the [create-theme-${{ github.event.issue.number }} branch](https://github.com/zen-browser/theme-store/tree/create-theme-${{ github.event.issue.number }}). * It has been created into the [create-theme-${{ github.event.issue.number }} branch](https://github.com/zen-browser/theme-store/tree/create-theme-${{ github.event.issue.number }}).
> If you have any questions or need help, feel free to ask in the comments below or in the PR. > If you have any questions or need help, feel free to ask in the comments below or in the PR.