Skip to content

nightly build

nightly build #401

Workflow file for this run

name: nightly build
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 1 * * *"
permissions:
contents: write
actions: read
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
nightly-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Install earthly
uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: "latest"
use-cache: true
- name: Get API key from vault
id: auth
uses: hashicorp/[email protected]
with:
method: jwt
url: "https://vault.prism.spectrocloud.com"
role: palette-stylus
secrets: |
/providers/github/spectrocloud/palette-stylus/token?org_name=spectrocloud token | token;
palette-stylus/data/secrets HUBBLE_API_KEY | HUBBLE_API_KEY;
- name: Get latest dev version
id: stylus_version
run: |
version=$(curl -Ls 'https://api.dev.spectrocloud.com/v1/services/stylus/version' \
-H 'Accept: application/json' \
-H 'ApiKey: ${{ steps.auth.outputs.HUBBLE_API_KEY }}' | jq -r '.spec.latestVersion.content' | grep -oP 'version:\s*\K\S+')
echo "version=v$version" >> $GITHUB_OUTPUT
- name: Build artifacts
run: |
set -x
earthly --ci --output +nightly \
--VERSION=nightly \
--SPECTRO_PUB_REPO=us-east1-docker.pkg.dev/spectro-images/daily \
--PE_VERSION=${{ steps.stylus_version.outputs.version }} \
--UBUNTU_IMAGE=us-docker.pkg.dev/palette-images/third-party/ubuntu:22.04
- name: Build FIPS artifacts
run: |
set -x
earthly --ci --output +nightly-fips \
--VERSION=nightly \
--SPECTRO_PUB_REPO=us-east1-docker.pkg.dev/spectro-images/daily-fips \
--PE_VERSION=${{ steps.stylus_version.outputs.version }} \
--UBUNTU_IMAGE=us-docker.pkg.dev/palette-images/third-party/ubuntu:22.04
- name: Upload release artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload --clobber nightly build/*