Required:
- curl
- jq
REPO="actions/runner" \
IDENTIFIER="linux-x64" \
curl -O -Ls $(curl -s "https://api.github.com/repos/${REPO}/releases/latest" | jq -r '.assets[] | select(.name | contains("'"${IDENTIFIER}"'")) | .browser_download_url')
Mon Aug 19 13:17:37 UTC 2019 |
--- | |
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
namespace: default | |
name: whoami | |
labels: | |
app: whoami | |
spec: |
Required:
REPO="actions/runner" \
IDENTIFIER="linux-x64" \
curl -O -Ls $(curl -s "https://api.github.com/repos/${REPO}/releases/latest" | jq -r '.assets[] | select(.name | contains("'"${IDENTIFIER}"'")) | .browser_download_url')
RELEASE_TYPE ?= patch | |
LATEST_TAG ?= $(shell git ls-remote -q --tags --sort=-v:refname | head -n1 | awk '{ print $2 }' | sed 's/refs\/tags\///g') | |
LATEST_SHA ?= $(shell git rev-parse origin/main) | |
NEW_TAG ?= $(shell docker run -it --rm alpine/semver semver -c -i $(RELEASE_TYPE) $(LATEST_TAG)) | |
release: | |
git tag "v$(NEW_TAG)" $(LATEST_SHA) | |
git push origin "v$(NEW_TAG)" |