Skip to content

minimize the dependencies #2

minimize the dependencies

minimize the dependencies #2

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]*.[0-9]*.[0-9]*'
jobs:
prepare:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
# Check Versions
- name: Check If Versions Match
run: |
cargo_version=$(cargo pkgid | cut -d'#' -f 2)
helm_version=$(yq .version charts/rustcloak-operator/Chart.yaml)
helm_appversion=$(yq .appVersion charts/rustcloak-operator/Chart.yaml)
set -x
test "${cargo_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_appversion}" = "${GITHUB_REF_NAME#v}"
build:
needs: prepare
runs-on: 'ubuntu-latest'
strategy:
matrix:
target:
- aarch64-unknown-linux-musl
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-build
name: Build
with:
target: ${{ matrix.target }}
use-cross: true
container:
needs:
- build
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: withlazers/container-action@main
with:
repository: rustclaok
username: gottox
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build Docker Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
archs: amd64, arm64
image: rustcloak-operator
tags: >
latest
${{ github.ref_name }}
containerfiles: ./Dockerfile
- name: Push to Dockerhub
if: startsWith(github.ref, 'refs/tags/v')
id: push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: docker.io/withlazers
username: gottox
password: ${{ secrets.DOCKER_TOKEN }}
release:
needs:
- container
- build
runs-on: 'ubuntu-latest'
steps:
- uses: withlazers/release-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh_key: ${{ secrets.HELMCHART_SSH_DEPLOY_KEY }}
artifacts: "*"
helm_chart: true