feat: ✨ allow setting up cron expression from config file as… #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release 🚀 | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: write | |
packages: write | |
attestations: write | |
id-token: write | |
discussions: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
docker_push: | |
name: Docker Build & Push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set env | |
run: | | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo "NOW=$(date --utc +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV | |
- name: Build & push Docker image to ghcr.io | |
uses: mr-smithers-excellent/docker-build-push@v6 | |
with: | |
image: git-sync | |
tags: ${{ env.RELEASE_VERSION }},latest | |
registry: ghcr.io | |
multiPlatform: true | |
platform: linux/amd64,linux/arm64,linux/arm/v7 | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
buildArgs: 'VERSION=${{ env.RELEASE_VERSION }},BUILD=${{ env.NOW }}' | |