From b75eb0914f8f95e6258ee00425474aecd3639336 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Mon, 11 Sep 2023 19:09:44 +0200 Subject: [PATCH] ci: Generate `codemeta.json` --- .github/workflows/codemeta.yaml | 44 ++++++++++++++++++++++++ .github/workflows/codemeta_validate.yaml | 21 ----------- 2 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/codemeta.yaml delete mode 100644 .github/workflows/codemeta_validate.yaml diff --git a/.github/workflows/codemeta.yaml b/.github/workflows/codemeta.yaml new file mode 100644 index 000000000..70f6951e4 --- /dev/null +++ b/.github/workflows/codemeta.yaml @@ -0,0 +1,44 @@ +name: codemeta + +on: + push: + paths: + - codemeta.json + - .github/workflows/codemeta.yaml + tags: + - 'v*' + pull_request: + paths: + - codemeta.json + - .github/workflows/codemeta.yaml + +env: + BUILDDIR: build + CODEMETA_ARTIFACT: codemeta.json + +jobs: + generate: + runs-on: ubuntu-latest + container: + image: ghcr.io/fairrootgroup/fairmq-dev/fedora-38:latest + steps: + - uses: actions/checkout@v3 + - name: configure + run: "cmake -G Ninja -S . -B $BUILDDIR" + - name: generate codemeta.json + run: "cmake --build $BUILDDIR --target codemeta" + - uses: actions/upload-artifact@v3 + with: + name: "$CODEMETA_ARTIFACT" + path: "$BUILDDIR/$CODEMETA_ARTIFACT" + validate: + needs: generate + runs-on: ubuntu-latest + container: + image: gitlab-registry.in2p3.fr/escape2020/wp3/eossr:v1.0 + steps: + - uses: actions/download-artifact@v3 + with: + name: "$CODEMETA_ARTIFACT" + - name: validate codemeta + run: "eossr-metadata-validator $CODEMETA_ARTIFACT" diff --git a/.github/workflows/codemeta_validate.yaml b/.github/workflows/codemeta_validate.yaml deleted file mode 100644 index 46a7b0c00..000000000 --- a/.github/workflows/codemeta_validate.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: validate codemeta - -on: - push: - paths: - - codemeta.json - - .github/workflows/codemeta_validate.yaml - pull_request: - paths: - - codemeta.json - - .github/workflows/codemeta_validate.yaml - -jobs: - build: - runs-on: ubuntu-latest - container: - image: gitlab-registry.in2p3.fr/escape2020/wp3/eossr:v1.0 - steps: - - uses: actions/checkout@v3 - - name: validate codemeta - run: eossr-metadata-validator codemeta.json