https://github.com/andrewarrow/workflow-poller
Poll github actions every 6 seconds and add the next tag you need.
https://github.com/andrewarrow/workflow-poller
deploy deployment git-tag git-tags github-actions tag tags
Last synced: about 2 months ago
JSON representation
Poll github actions every 6 seconds and add the next tag you need.
- Host: GitHub
- URL: https://github.com/andrewarrow/workflow-poller
- Owner: andrewarrow
- License: mit
- Created: 2025-02-20T19:50:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T16:36:44.000Z (over 1 year ago)
- Last Synced: 2025-06-04T17:45:59.539Z (about 1 year ago)
- Topics: deploy, deployment, git-tag, git-tags, github-actions, tag, tags
- Language: Go
- Homepage: https://andrewarrow.dev/
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# workflow-poller
A little go program to poll github actions every 6 seconds looking for
`completed` actions that match your current git HEAD SHA
```
git rev-parse HEAD
```
Each poll returns a `map[string]bool` of the tags with your SHA now in completed
state.
It helps a lot to have your branch and sha in your prompt:
```
autoload -Uz vcs_info
precmd() {
vcs_info
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
GITHEAD=$(git rev-parse --short HEAD 2>/dev/null)
else
GITHEAD=""
fi
}
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '%F{cyan}(%b)%f'
zstyle ':vcs_info:*' enable git
# Set up the prompt with git HEAD
setopt prompt_subst
PROMPT='%F{blue}%~%f ${vcs_info_msg_0_}%F{yellow}${GITHEAD:+[${GITHEAD}]}%f $ '
```
In `main.go` you'll find sample logic to look for completed tags, and then add
the next needed tag.
You need three env vars:
```
os.Getenv("GITHUB_TOKEN")
os.Getenv("WORKFLOW_POLLER_OWNER")
os.Getenv("WORKFLOW_POLLER_REPO")
```