Skip to content

Update and create release #19176

Update and create release

Update and create release #19176

Workflow file for this run

name: Update and create release
on:
schedule:
- cron: "10,40 * * * *"
workflow_dispatch:
jobs:
updateData:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
working-directory: ./.github/workflows
steps:
- uses: actions/checkout@master
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: false
activate-environment: covid
python-version: 3.11
miniconda-version: "latest"
channels: conda-forge,defaults
- name: Install requirements
run: pip install -r ./requirements.txt
working-directory: ./
- name: update
id: update
run: ./update_ghAction.sh
continue-on-error: true
working-directory: ./
timeout-minutes: 70
- name: Commit files
if: steps.update.outcome == 'success'
run: |
git config user.name github-actions
git config user.email [email protected]
git add ':/*.csv'
git add ':/*.json'
git add ':/*.feather'
git add ':/*.xz'
git status -s
git commit -m "update on $(date '+%Y-%m-%dT%H:%M:%SZ')"
- name: set up env var
if: steps.update.outcome == 'success'
run: echo "TAG=v1.9.$(date '+%Y%m%d')" >> $GITHUB_ENV
- name: Create Tag
if: steps.update.outcome == 'success'
uses: rickstaa/action-create-tag@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.TAG }}
message: "${{ env.TAG }} release"
- name: Release
if: steps.update.outcome == 'success'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
- name: Push_changes
id: push
if: steps.update.outcome == 'success'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
- name: Trigger update Workflow in DATA5
if: steps.push.outcome == 'success'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PAT }} # Fine-grained GitHub PAT that was saved as repository secret
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'Rubber1Duck',
repo: 'RD_RKI_COVID19_DATA5',
workflow_id: 'update.yaml',
ref: 'master'
})
call-cleanup:
needs: updateData
uses: ./.github/workflows/delete_old_workflows.yaml
secrets: inherit