Generate tamper-monkey-script #7
Workflow file for this run
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: "Generate Tampermonkey script" | |
on: | |
pull_request: | |
jobs: | |
gomplate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Install gomplate | |
run: | | |
wget -O gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.10.0/gomplate_linux-amd64 | |
chmod +x gomplate | |
sudo mv gomplate /usr/local/bin/ | |
- name: Run gomplate | |
run: gomplate < script.js.tmpl > script.js | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "Update script.js using gomplate" || true | |
git push |