create release #56
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: build | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
permissions: | |
checks: write | |
contents: write | |
packages: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4.0.0 | |
with: | |
fetch-depth: 0 | |
- name: createVersion | |
run: | | |
echo "GIT_VERSION=$(git describe --tag --always)" >> $GITHUB_ENV | |
echo "VERSION=$(git describe --tag --always | sed s/^v//)" >> $GITHUB_ENV | |
- name: golangci-lint | |
uses: reviewdog/action-golangci-lint@v2 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'Login to GitHub Container Registry' | |
uses: docker/login-action@v2.2.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and push | |
run: | | |
make docker-buildx VERSION=${{ env.VERSION }} | |
- name: bundle | |
if: contains(fromJson('["refs/heads/main", "refs/tags"]'), github.event.action) | |
run: | | |
make bundle bundle-build bundle-push VERSION=${{ env.VERSION }} | |
- name: catalog | |
if: contains(fromJson('["refs/heads/main", "refs/tags"]'), github.event.action) | |
run: | | |
make catalog-build catalog-push VERSION=${{ env.VERSION }} |