From 156ba44656ceb1cab4cd9bc3c763e9df447697a9 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 31 Aug 2022 08:19:42 -0400 Subject: [PATCH] Update get-roots.yml --- .github/workflows/get-roots.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/get-roots.yml b/.github/workflows/get-roots.yml index 346347d7..25ff95eb 100644 --- a/.github/workflows/get-roots.yml +++ b/.github/workflows/get-roots.yml @@ -20,11 +20,17 @@ jobs: persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - name: pwd - run: pwd - - - name: ls - run: ls -alRF - - name: Check for updates - run: curl -o src/roots.pem -vvvv https://pki.goog/roots.pem + run: curl -o ./roots.pem -vvvv https://pki.goog/roots.pem + + - name: Commit file + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add roots.pem + git diff --quiet && git diff --staged --quiet || git commit -am '[ci skip] Updated roots.pem' + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }}