diff --git a/.github/workflows/periodic-update.yml b/.github/workflows/periodic-update.yml index 3092575..21897b9 100644 --- a/.github/workflows/periodic-update.yml +++ b/.github/workflows/periodic-update.yml @@ -2,7 +2,8 @@ name: Periodic updates on: push: - branches: [ main ] + branches: [ master ] + paths: [ files.list ] schedule: - cron: "0 0 * * *" workflow_dispatch: ~ @@ -27,9 +28,25 @@ jobs: - name: Push uses: JamesIves/github-pages-deploy-action@v4 + id: deploy-file with: branch: master folder: . git-config-name: github-actions[bot] git-config-email: 41898282+github-actions[bot]@users.noreply.github.com commit-message: updated ${{ steps.current-time.outputs.formattedTime }} UTC + + - name: tagging-get-current-time + if: ${{ steps.deploy-file.outputs.deployment-status == 'success' }} + uses: srfrnk/current-time@master + id: current-time-tagging + with: + format: "YYYYMMDD" + + - name: tagging + if: ${{ steps.deploy-file.outputs.deployment-status == 'success' }} + uses: anothrNick/github-tag-action@1.75.0 + env: + CUSTOM_TAG: ${{ steps.current-time-tagging.outputs.formattedTime }} + DEFAULT_BRANCH: master + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/verify-update.yml b/.github/workflows/verify-update.yml new file mode 100644 index 0000000..e941260 --- /dev/null +++ b/.github/workflows/verify-update.yml @@ -0,0 +1,18 @@ +name: Verify updates (check only) + +on: + pull_request: + paths: [ files.list ] + workflow_dispatch: ~ + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Update + run: | + bash update-files.sh