Skip to content

Chore: Bump versions (#905) #8

Chore: Bump versions (#905)

Chore: Bump versions (#905) #8

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6
- name: Get the version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
if [[ ${GITHUB_REF} == "refs/heads/main" ]]; then
VERSION=latest
fi
echo ::set-output name=VERSION::${VERSION}
- name: Get git revision
id: vars
shell: bash
run: |
echo "git_revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/[email protected]
- uses: docker/[email protected]
with:
driver-opts: image=moby/buildkit:master
- name: Build docker image
id: acr_build
uses: docker/[email protected]
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
VERSION=${{ steps.get_version.outputs.VERSION }}
GOPROXY=https://proxy.golang.org
tags: |-
oamdev/velaux:${{ steps.get_version.outputs.VERSION }}