From dddf90af1e392d271a16ec4aa94221f643bfba3f Mon Sep 17 00:00:00 2001 From: Anh Nguyet Vu Date: Sun, 15 May 2022 11:30:53 -0600 Subject: [PATCH] feat(ci/cd): Add dispatch workflow --- .github/workflows/dispatch-downstream-dev.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/dispatch-downstream-dev.yml diff --git a/.github/workflows/dispatch-downstream-dev.yml b/.github/workflows/dispatch-downstream-dev.yml new file mode 100644 index 0000000..2878a8f --- /dev/null +++ b/.github/workflows/dispatch-downstream-dev.yml @@ -0,0 +1,28 @@ +name: Dispatch downstream dev + +on: + release: + types: [published] + +env: + REPO_RAW: https://raw.githubusercontent.com/gf-dcc/data-model + SRC_FILE: GF.jsonld + +jobs: + dispatch-downstream-dev: + runs-on: ubuntu-latest + steps: + - name: Generate input payload + id: payload + run: | + sudo apt install jq + URL=$REPO_RAW/$GITHUB_REF_NAME/$SRC_FILE + INPUT=$(jq -n -c --arg url "$URL" '{ source: $url}') + echo "::set-output name=INPUT::$INPUT" + - uses: benc-uk/workflow-dispatch@v1 + with: + workflow: Update source model for dev + repo: gf-dcc/data_curator + ref: refs/heads/gf-dev + token: ${{ secrets.REPO_PAT }} + inputs: ${{ steps.payload.outputs.INPUT }} \ No newline at end of file