From 9ef5f03052e6755d7d05c484e3f5d904fb98784f Mon Sep 17 00:00:00 2001 From: Steve C Date: Fri, 17 Jan 2025 04:54:31 -0500 Subject: [PATCH] tweak auto update workflow --- .github/workflows/update_logit_values.yaml | 30 ++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/update_logit_values.yaml b/.github/workflows/update_logit_values.yaml index 08be069a..3bf58076 100644 --- a/.github/workflows/update_logit_values.yaml +++ b/.github/workflows/update_logit_values.yaml @@ -4,9 +4,6 @@ on: workflow_dispatch: schedule: - cron: "0 0 1 * *" - push: - paths: - - "automation/*" concurrency: # since this runs on an interval this should be fine @@ -23,18 +20,19 @@ jobs: - name: Run Docker run: | - cd automation/ - docker build -t nfc_values . - docker compose up - sudo chown -R $USER:$USER . + cd ./automation/ + docker compose run --rm nfc_values + cp "./output/javascript.js" "./../src/app/constants_logit.js" - - name: Commit and PR changes - # success() ensures the previous job succeeds - if: ${{ success() }} - uses: peter-evans/create-pull-request@v6 + - name: Git stuff + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add . + git commit -m "[Automated] Update logit values" + + - name: push + uses: ad-m/github-push-action@master with: - commit-message: "Autogenerated commit for logit update" - body: | - Update logit with latest data. - branch: update/logit - title: "[Automated] Update logit values" + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }}