Skip to content

Publish Release

Publish Release #14

Workflow file for this run

name: Publish Release
on:
workflow_dispatch:
inputs:
version_bump:
description: 'Version bump (major, minor, patch)'
required: true
default: 'patch'
jobs:
validate-input:
runs-on: ubuntu-latest
steps:
- name: Validate input
id: validate
run: |
if [[ "${{ github.event.inputs.version_bump }}" != "major" && "${{ github.event.inputs.version_bump }}" != "minor" && "${{ github.event.inputs.version_bump }}" != "patch" ]]; then
echo "Invalid input for version_bump. Please provide 'major', 'minor', or 'patch'."
exit 1
fi
release:
needs: validate-input
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- id: release
uses: rymndhng/release-on-push-action@v0.28.0
with:
bump_version_scheme: ${{ github.event.inputs.version_bump }}
use_github_release_notes: true
tag_prefix: v
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
push: true
tags: tesla/fleet-telemetry:${{ steps.release.outputs.version }}