nightly build #388
This file contains hidden or 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: nightly build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 1 * * *' | |
| permissions: | |
| contents: 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 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: ${{ secrets.HUBBLE_API_TOKEN }}' | 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/* |