Skip to content

Instantly share code, notes, and snippets.

View mambelli's full-sized avatar

Marco Mambelli mambelli

  • Fermilab
  • Batavia, IL
View GitHub Profile
@mambelli
mambelli / var_and_trigger.yml
Last active February 24, 2022 18:07
GitHub workflow example using env variables and a repository dispatch trigger for the workflow
# This workflow can be triggered w/ a dispatch event, e.g.:
# curl -X POST -H "Authorization: token $(cat /tmp/token_file)" \
# -H "Content-Type: application/json" -H "Accept: application/vnd.github.v3+json" \
# https://api.github.com/repos/{owner}/{repo}/dispatches \
# -d '{"event_type":"test-trigger", "client_payload": {"label": "latest", "date_tag":true}}'
# A valid GitHub token must be saved in the file (so that is presented in the authorization)
# otherwise a misleading "Not Found" message is returned. No reply is provided for successful posts.
# The client_payload label and date_tag are optional
# label is used as Docker Hub label instead of "latest"
# if date_tag id true a date tag is added to the Docker Hub label (+%Y%m%d-%H%M)
### Keybase proof
I hereby claim:
* I am mambelli on github.
* I am marcomambelli (https://keybase.io/marcomambelli) on keybase.
* I have a public key whose fingerprint is 1EF5 E723 6424 CB38 458B FC50 7494 0E6B 002C 0CFA
To claim this, I am signing this object: