Check for updates #183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for updates | |
on: | |
push: | |
branches: | |
- '*' | |
schedule: | |
- cron: '0 0 * * *' | |
# Runs at midnight UTC every day | |
jobs: | |
update_versioning: | |
runs-on: ubuntu-latest | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
actions: write | |
checks: write | |
contents: write | |
deployments: write | |
id-token: write | |
packages: write | |
pages: write | |
pull-requests: write | |
repository-projects: write | |
statuses: write | |
steps: | |
- name: Install CMIP-LD | |
id: install-cmipld | |
uses: WCRP-CMIP/CMIP-LD/actions/cmipld@main | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch the complete commit history | |
- name: Set up Git | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "Daniel Ellis" | |
git config credential.helper store | |
git config --global user.email "[email protected]" | |
git config --global user.name "Daniel Ellis" | |
git config --global push.default current | |
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
shell: bash | |
- name: content update | |
id: run-python-script | |
run: python .github/generate.py | |
shell: bash | |
# - name: Get a list of directories with updated files | |
# id: updated-dirs | |
# uses: WCRP-CMIP/CMIP-LD/actions/updated-dirs@main | |
# with: | |
# filter_dir: "data_descriptors" | |
# - name: Group JSONLD files | |
# id: group-jsonld | |
# uses: WCRP-CMIP/CMIP-LD/actions/process_jsonld@main | |
# with: | |
# dirs: ${{ env.updated_dirs }} | |
# - name: Commit All | |
# uses: WCRP-CMIP/CMIP-LD/actions/commit-all@main | |
# with: | |
# message: "Automated Content Update" | |
# - name: Push Changes | |
# run: | | |
# git push | |
- name: Publish | |
uses: WCRP-CMIP/CMIP-LD/actions/publish2pages@main | |
with: | |
api_key: ${{ secrets.API_KEY }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch_name: ${{ github.ref_name }} |