Skip to content

Nightly Build

Nightly Build #339

Workflow file for this run

name: Nightly Build
on:
schedule:
- cron: '00 21 * * *' #UTC
permissions:
contents: read
env:
IMAGE_REGISTRY: ${{ vars.REGISTRY_NIGHTLY }}
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG: nightly
jobs:
build-container:
permissions:
contents: read # for actions/checkout to fetch code
packages: write # for docker/build-push-action to store image to package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Log in to the Nightly Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Test
run: |
export TEST_IMAGE_NAME=${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker compose --file docker-compose.test.yml up --exit-code-from sut -t 10 --build
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
scan-nightly-build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
uses: ./.github/workflows/scan.yml
needs: [build-container]
with:
image: ${{ vars.REGISTRY_NIGHTLY }}/${{ github.repository }}:nightly
tag-and-release:
permissions:
contents: write # for ncipollo/release-action to create release
uses: ./.github/workflows/auto-release.yml
needs: [build-container]
with:
image: ${{ vars.REGISTRY_NIGHTLY }}/${{ github.repository }}:nightly
secrets:
RELEASE_BOT_APP_ID: ${{ secrets.RELEASE_BOT_APP_ID }}
RELEASE_BOT_PRIVATE_KEY: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}