Merge branch 'metrics-init-zero' #15
Workflow file for this run
This file contains hidden or 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 and publish container | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| env: | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| release-container: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Login to quay.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: quay.io | |
| username: "kaszpir+github_com_nvtkaszpir_cs_mikrotik_bouncer_alt" | |
| password: ${{ secrets.auth_token }} | |
| - name: Install ko | |
| uses: imjasonh/[email protected] | |
| env: | |
| KO_DOCKER_REPO: quay.io/kaszpir | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: cs-mikrotik-bouncer-alt | |
| sep-tags: "," | |
| sep-labels: "," | |
| tags: | | |
| type=semver,pattern=v{{version}} | |
| type=semver,pattern=v{{major}}.{{minor}} | |
| type=semver,pattern=v{{major}} | |
| - name: Build and Push to quay.io with ko | |
| env: | |
| KO_DOCKER_REPO: quay.io/kaszpir | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| LABELS: ${{ steps.meta.outputs.labels }} | |
| PLATFORMS: linux/amd64,linux/arm64,linux/arm | |
| run: | | |
| go mod tidy | |
| PTAGS=`echo $TAGS | sed 's/cs-mikrotik-bouncer-alt://g'` | |
| export SOURCE_DATE_EPOCH=$(date +%s) | |
| echo TAGS=$TAGS | |
| echo PTAGS=$PTAGS | |
| echo LABELS=$LABELS | |
| echo PLATFORMS=$PLATFORMS | |
| ko build -B --image-label "$LABELS" -t "$PTAGS" --platform=$PLATFORMS . |