Skip to content

use right upstream image #35

use right upstream image

use right upstream image #35

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]*.[0-9]*.[0-9]*'
- 'snapshot-*'
jobs:
prepare:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
# Check Versions
- name: Check If Versions Match
if: contains(github.ref_name, 'snapshot') == false
run: |
helm_version=$(yq .version charts/rustcloak-operator/Chart.yaml)
helm_appversion=$(yq .appVersion charts/rustcloak-operator/Chart.yaml)
cargo_version=$(cargo pkgid --manifest-path rustcloak-operator/Cargo.toml | cut -d'#' -f 2)
cargo_version=$(cargo pkgid --manifest-path rustcloak-crd/Cargo.toml | cut -d'#' -f 2)
set -x
test "${cargo_crd_version}" = "${GITHUB_REF_NAME#v}"
test "${cargo_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_version}" = "${GITHUB_REF_NAME#v}"
test "${helm_appversion}" = "${GITHUB_REF_NAME}"
build:
needs: prepare
runs-on: 'ubuntu-latest'
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-build
name: Build
with:
target: ${{ matrix.target }}
use-cross: true
build-apple:
needs: prepare
runs-on: 'macos-latest'
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/rust-build
name: Build Apple
with:
target: ${{ matrix.target }}
use-cross: false
container:
needs:
- build
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: withlazers/container-action@main
with:
repository: rustcloak-operator
username: gottox
password: ${{ secrets.DOCKER_TOKEN }}
ref-tags: ${{ github.ref_name }}
dockerfile: ./dev-scripts/Dockerfile.release
archs: "amd64 arm64"
release:
if: contains(github.ref_name, 'snapshot') == false
needs:
- container
- build
- build-apple
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: withlazers/release-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh_key: ${{ secrets.HELMCHART_SSH_DEPLOY_KEY }}
artifacts: "*"
helm_chart: rustcloak-operator