Skip to content

Release

Release #21

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version'
required: true
jobs:
set-env:
runs-on: ubuntu-latest
outputs:
RELEASE_VERSION: ${{ steps.set_version.outputs.RELEASE_VERSION }}
steps:
- name: Set RELEASE_VERSION from tag
if: github.event_name == 'push'
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Set RELEASE_VERSION from workflow input
if: github.event_name == 'workflow_dispatch'
run: echo "RELEASE_VERSION=${{ github.event.inputs.releaseVersion }}" >> $GITHUB_ENV
- name: Output RELEASE_VERSION
id: set_version
run: echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" >> $GITHUB_OUTPUT
publish-image:
name: Publish Docker image
needs: set-env
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix on self-hosted ARC runners
uses: cachix/install-nix-action@V28
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: false
skip-nix-installation: true
- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.MESOSPHERECI_USER_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build container image
run: devbox run -- make container
env:
GITHUB_TOKEN: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
TAG: ${{ needs.set-env.outputs.RELEASE_VERSION }}
- name: Push container image
run: devbox run -- make push-image
env:
TAG: ${{ needs.set-env.outputs.RELEASE_VERSION }}