[SETUP] bmw_m3_gt2@spa #16
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
name: Create setup file | |
on: | |
issues: | |
types: | |
- closed | |
permissions: | |
contents: write | |
jobs: | |
create-setup-file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check if issue meets criteria | |
uses: actions/setup-node@v3 | |
# with: | |
# node-version: "16" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create setup file from issue | |
run: | | |
CONTEXT="$(echo '${{ toJson(github.event) }}')" | |
echo "$CONTEXT" > context.json # Save the context to a file for debugging | |
node ./src/script.js | |
- name: Commit changes | |
run: | | |
commit_message=$(cat ./commit-message.txt) | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git add setups/ | |
git commit -m "$(echo $commit_message)" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: main |