Feature/add demo #21
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: Go | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "README.md" | |
- "docs/**" | |
- ".github/**" | |
- ".img/**" | |
- "config.yaml" | |
- "dockerfile" | |
- ".dockerignore" | |
- ".gitignore" | |
- "LICENSE" | |
release: | |
types: [created] | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Git Version | |
id: version | |
uses: paulhatch/[email protected] | |
with: | |
tag_prefix: "v" | |
version_format: ${{ github.event_name == 'release' && '${major}.${minor}.${patch}' || '${major}.${minor}.${patch}-prerelease${increment}' }} | |
- name: Setup buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run make | |
run: | | |
VERSION=${{ steps.version.outputs.version }} make docker-build | |
- name: Login to GitHub Container Registry | |
if: github.event_name == 'push' || github.event_name == 'release' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Image | |
if: github.event_name == 'push' || github.event_name == 'release' | |
run: | | |
VERSION=${{ steps.version.outputs.version }} make docker-push | |
- name: Publish Helm Chart | |
if: github.event_name == 'push' || github.event_name == 'release' | |
run: | | |
VERSION=${{ steps.version.outputs.version }} make helm-push |