Skip to content

Commit

Permalink
123
Browse files Browse the repository at this point in the history
  • Loading branch information
6Kmfi6HP committed Sep 12, 2024
1 parent eee37ee commit e1c2905
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/obfuscator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,36 @@ on:
jobs:
obfuscate:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "16"

- name: Install dependencies
run: npm install -g javascript-obfuscator

- name: Obfuscate code
run: |
javascript-obfuscator index.js --output _worker.js
javascript-obfuscator _worker.js --output _worker.obfuscated.js
mv _worker.obfuscated.js _worker.js
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add _worker.js
git commit -m "Obfuscate _worker.js" || echo "No changes to commit"
git push
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit e1c2905

Please sign in to comment.