Skip to content

Fix Sub Ouput

Fix Sub Ouput #1230

Workflow file for this run

name: Fix Sub Ouput
on:
push:
paths:
- 'python/replace.py'
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
jobs:
update-file:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch content from URL and update file
run: |
# Fetch content from URL
curl -L "${{ secrets.INPUT_URL }}" | base64 --decode > ./sub
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Run Replace
run: |
python python/replace.py
- name: Commit Sub
run: |
git config --local user.email "action@github.com"
git config --local user.name "Github Action"
git add -A
git diff --quiet && get diff -staged --quiet || git commit -m "Fix Sub"
git push
- name: Run Pretest
run: |
python python/pretest.py
- name: Convert Sub to Base64
run: |
content=$(cat sub | base64 | tr -d '\n')
echo "$content" > sub64
- name: Convert Pretest to Base64
run: |
content=$(cat python/pretest | base64 | tr -d '\n')
echo "$content" > python/pretest64
- name: Commit Base64 Changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "Github Action"
git add -A
git diff --quiet && get diff -staged --quiet || git commit -m "Convert to Base64"
git push