Skip to content

Commit

Permalink
Update Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWuensche committed Apr 12, 2023
1 parent d2acb79 commit 486b240
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 133 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/.zenodo_whitelist_replace_doi

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/.zenodo_whitelist_uploads

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Bulild and deploy OpenData website
name: Build and deploy OpenData-Website

on:
workflow_dispatch:
workflow_run:
workflows: ["Release new version on Github and Zenodo"]
workflows: ["Create release on tag push"]
types:
- completed

Expand All @@ -13,6 +13,7 @@ jobs:
build:
# The type of runner that the job will run on
name: Bulid and deploy OpenData Website
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/Create_release_on_tag_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Create release on tag push

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- '[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Release:
name: Create Release
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{github.ref_name}}
release_name: Datenstand ${{github.ref_name}}
body: Datenstand ${{github.ref_name}} inklusive aktualisierter Metadaten
draft: false
prerelease: false
118 changes: 0 additions & 118 deletions .github/workflows/OpenData_ReleaseNewVersion.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/Send_metadata_to_Govdata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Send metadata to Govdata
on:
workflow_dispatch:
push:
paths:
- 'Metadaten/**.ttl'
jobs:
Push_Govdata_ttl:
name: Push metadata to Govdata-Repository
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Rename ttl with reponame
run: cp Metadaten/govdata.ttl Metadaten/${{ github.event.repository.name }}.ttl

- name: Push dataset ttl to Govdata repository
id: pushStep1
continue-on-error: true
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.GOVDATA_TOKEN }}
with:
source_file: 'Metadaten/${{ github.event.repository.name }}.ttl'
destination_repo: 'robert-koch-institut/Metadaten_fuer_GovData'
destination_folder: 'Datensaetze'
commit_message: 'adding ${{ github.event.repository.name }}.ttl'
user_email: 'opendata@rki.de'
user_name: 'RKIOpenData'

- name: Retry push dataset ttl to Govdata repository
id: pushStep2
if: steps.pushStep1.outcome == 'failure'
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.GOVDATA_TOKEN }}
with:
source_file: 'Metadaten/${{ github.event.repository.name }}.ttl'
destination_repo: 'robert-koch-institut/Metadaten_fuer_GovData'
destination_folder: 'Datensaetze'
commit_message: 'adding ${{ github.event.repository.name }}.ttl'
user_email: 'opendata@rki.de'
user_name: 'RKIOpenData'

0 comments on commit 486b240

Please sign in to comment.