on: push: branches: ["main"] permissions: write-all jobs: build: runs-on: ubuntu-latest steps: - name: checkout repo content uses: actions/checkout@v3 # checkout the repository content to github runner. - name: setup python uses: actions/setup-python@v4 with: python-version: 3.8 #install the python needed - name: install python packages run: | pip install PyGithub pandas mistletoe lxml beautifulsoup4 - name: execute py script # run the run.py to get the latest data env: EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }} EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }} GITHUB_TOKEN: ${{ github.token }} run: | python generate_json.py -t ${{ secrets.GITHUB_TOKEN }} - uses: stefanzweifel/git-auto-commit-action@v4 env: EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }} EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }} GITHUB_TOKEN: ${{ github.token }} with: commit_message: Automated Change # Optional. Options used by `git-commit`. # See https://git-scm.com/docs/git-commit#_options commit_options: '--no-verify --signoff' file_pattern: 'app-repo.json app-repo-esign.json bundleId.csv icons/*' # Optional commit user and author settings commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]" commit_user_email: my-github-actions-bot@example.org # defaults to "41898282+github-actions[bot]@users.noreply.github.com" commit_author: Author # defaults to author of the commit that triggered the run push_options: '--force' # - name: commit files # run: | # git config --local user.email "action@github.com" # git config --local user.name "GitHub Action" # git add -A # git commit -m "update apps.json" -a # - name: push changes # uses: ad-m/github-push-action@v0.6.0 # with: # github_token: ${{ secrets.SECRET_NAME }} # branch: main