custom-release #19
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: custom-release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "version tag to use for custom release" | |
required: true | |
env: | |
GO_VERSION: "1.21" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: install devspace | |
run: | | |
curl -L -o devspace \ | |
"https://github.com/loft-sh/devspace/releases/download/${{ vars.DEVSPACE_VERSION}}/devspace-linux-amd64" && | |
install -c -m 0755 devspace /usr/local/bin | |
working-directory: /tmp | |
- name: login to ghcr | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build and push images | |
run: | | |
devspace run build --profile custom-release --var RELEASE_VERSION=${{ github.event.inputs.version }} | |
# packaging charts but *not* uploading them to ghcr, only to artifacts repo; mostly this is | |
# so we can have a process for testing ci bits w/out actually cutting a release and/or being | |
# on main. note that we also update the values files (only the stuff that gets packaged, we | |
# don't commit this back to the repo or anything silly like that) to the release hash so that | |
# when using the chart(s) in the artifacts the images are already set to the associated hash. | |
- name: package charts | |
run: | | |
RELEASE_VERSION=0.0.0 | |
make set-chart-versions $RELEASE_VERSION | |
export CLICKER_IMAGE="ghcr.io/srl-labs/clabernetes/clabernetes-clicker:${{ github.event.inputs.version }}" | |
echo "clicker image->" $CLICKER_IMAGE | |
yq -i eval '.image = strenv(CLICKER_IMAGE)' charts/clicker/values.yaml | |
export MANAGER_IMAGE="ghcr.io/srl-labs/clabernetes/clabernetes-manager:${{ github.event.inputs.version }}" | |
export LAUNCHER_IMAGE="ghcr.io/srl-labs/clabernetes/clabernetes-launcher:${{ github.event.inputs.version }}" | |
echo "manager image->" $MANAGER_IMAGE | |
echo "launcher image->" $LAUNCHER_IMAGE | |
yq -i eval '.manager.image = strenv(MANAGER_IMAGE)' charts/clabernetes/values.yaml | |
yq -i eval '.launcher.image = strenv(LAUNCHER_IMAGE)' charts/clabernetes/values.yaml | |
helm package charts/clicker --version $RELEASE_VERSION | |
helm package charts/clabernetes --version $RELEASE_VERSION | |
- name: archive packaged helm clicker chart | |
uses: actions/upload-artifact@v3 | |
with: | |
name: clicker-0.0.0.tgz | |
path: clicker-0.0.0.tgz | |
retention-days: 30 | |
- name: archive packaged helm clabernetes chart | |
uses: actions/upload-artifact@v3 | |
with: | |
name: clabernetes-0.0.0.tgz | |
path: clabernetes-0.0.0.tgz | |
retention-days: 30 |