Skip to content

version bump: v2.10.1 #29

version bump: v2.10.1

version bump: v2.10.1 #29

Workflow file for this run

name: release
on:
push:
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
jobs:
release:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: set RELEASE_VERSION ENV var
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: ensure image version is set to release version
run: |
image=$(yq '.runs.image' action.yml)
echo "Image: $image"
echo "Release version: ${{ env.RELEASE_VERSION }}"
[[ "$image" == *"${{ env.RELEASE_VERSION }}" ]]
- name: update the major version tag
id: majorver
uses: actions/[email protected]
with:
source-tag: ${{ env.RELEASE_VERSION }}
- name: login to GitHub container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v5
with:
push: true
build-args: |
VERSION=${{ env.RELEASE_VERSION }}
tags: |
ghcr.io/vladopajic/go-test-coverage:${{ env.RELEASE_VERSION }}
ghcr.io/vladopajic/go-test-coverage:${{ steps.majorver.outputs.major-tag }}
ghcr.io/vladopajic/go-test-coverage:latest