Skip to content

Set version file.

Set version file. #21

Workflow file for this run

name: Inform the Python package index about a new DaCe release.
on:
# Trigger for all pushes to tags matching this pattern
push:
tags:
- __gt4py-next-integration_*
# To "install" this workflow you must enable this trigger, such that the workflow runs at least one.
# You should also disable any processing such that no commit in the index repo is performed.
# See https://stackoverflow.com/a/71057825
#pull_request:
# Allows to trigger the update manually.
# NOTE: Is only possible if the workflow file is located on the default and the branch where it should run on.
workflow_dispatch:
jobs:
update-dace:
runs-on: ubuntu-latest
steps:
- name: Inform Index
shell: bash
run: |
INDEX_ORGANIZATION="gridtools"
INDEX_REPO="python-pkg-index"
# We are using `github.sha` here to be sure that we transmit an identifier to the index
# that can be checked out. Before we used `github.ref_name` but got strange results
# with it.
DEPENDENCY_REF="${{ github.sha }}"
SOURCE_REPO="dace"
SOURCE_OWNER="gridtools"
curl -L -v --fail-with-body \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PKG_UPDATE_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${INDEX_ORGANIZATION}/${INDEX_REPO}/dispatches" \
-d '{"event_type":"update_package_index","client_payload":{"source_repo":"'"${SOURCE_REPO}"'","source_org":"'"${SOURCE_OWNER}"'","dependency_ref":"'"${DEPENDENCY_REF}"'"}}'
if [ $? -ne 0 ]
then
echo "POST to '${INDEX_ORGANIZATION}:${INDEX_REPO}' failed.
exit 1
fi
exit 1