0.0.5 #10
Workflow file for this run
This file contains 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: Release | |
on: | |
release: | |
types: [released] | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
release_image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update version | |
# Update a version in Cargo.toml before building the app. | |
run: sed -i '0,/^version = .*/{s/version = .*/version = "${{ github.ref_name }}"/}' Cargo.toml | |
- name: Set up Docker | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 # ,linux/arm64,linux/arm/v7 (uncomment once the fix for long builds is found). | |
push: true | |
tags: ghcr.io/intreecom/robotlb:latest,ghcr.io/intreecom/robotlb:${{ github.ref_name }} | |
upload_helm: | |
runs-on: ubuntu-latest | |
needs: [release_image] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: azure/[email protected] | |
with: | |
version: latest | |
- name: Build Helm chart | |
run: | | |
helm package --app-version "${{ github.ref_name }}" --dependency-update ./helm | |
helm show chart *.tgz | |
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
helm push *.tgz oci://ghcr.io/intreecom/charts | |
env: | |
HELM_EXPERIMENTAL_OCI: 1 |