Fix cron spec in GitHub workflow. (#390)

* Fix quoting lints.
This commit is contained in:
M. J. Fromberger
2022-01-19 09:47:39 -08:00
committed by GitHub
parent c06c6a9244
commit 02c354d62c
+7 -7
View File
@@ -18,7 +18,7 @@ on:
- "proto/*"
schedule:
# run this job once a month to recieve any go or buf updates
- cron: "* * 1 * *"
- cron: "0 9 1 * *"
env:
REGISTRY: ghcr.io
@@ -34,16 +34,16 @@ jobs:
run: |
DOCKER_IMAGE="${REGISTRY}/${IMAGE_NAME}"
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
if [[ "$GITHUB_REF" == "refs/tags/*" ]]; then
VERSION="${GITHUB_REF#refs/tags/}"
elif [[ "$GITHUB_REF" == "refs/heads/*" ]]; then
VERSION="$(echo "${GITHUB_REF#refs/heads/}" | sed -r 's#/+#-#g')"
if [[ "${{ github.event.repository.default_branch }}" = "$VERSION" ]]; then
VERSION=latest
fi
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
echo ::set-output name=tags::${TAGS}
echo ::set-output name=tags::"${TAGS}"
- name: Set up docker buildx
uses: docker/setup-buildx-action@v1.6.0