Skip to content

.github/workflows/updateall.yml #109

.github/workflows/updateall.yml

.github/workflows/updateall.yml #109

Workflow file for this run

on:
# https://crontab.guru/#0_10,22_*_*_*
schedule:
- cron: '0 8 * * *'
#- cron: '0 10,22 * * *'
workflow_dispatch:
inputs:
print_tags:
description: 'True to print to STDOUT'
required: false
type: boolean
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
updateall:
runs-on: ubuntu-latest
timeout-minutes: 45
#if: ${{ inputs.print_tags }}
steps:
- uses: actions/checkout@v4
with:
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: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Update all refs
run: ./updateall.sh
- name: Add all to git
run: git add -A
- name: Git status
run: git status
- name: Commit & Push changes
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 # https://github.com/actions-js/push/releases/tag/v1.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: updateall
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'chore: update existing repos ${date}'