# Nightly pipeline running each day for main. name: Nightly build on: schedule: - cron: 30 4 * * * workflow_dispatch: jobs: # While many of these jobs could be grouped in a separate workflow, the github actions UI # is much nicer if they are instead listed explicitly here. As a result, changes made here # may need to be mirrored in .github/workflows/release.yml. ########################### #### testing jobs ### ########################### standard_tests_jobs: name: Standard tests permissions: contents: read uses: "./.github/workflows/standard_tests_jobs.yml" extended_tests_jobs: name: Extended tests permissions: contents: read uses: "./.github/workflows/extended_tests_jobs.yml" secrets: AWS_TEST_FARM_PEM: "${{ secrets.AWS_TEST_FARM_PEM }}" AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" ########################### #### packaging jobs ### ########################### docker_packaging_jobs: name: Docker packaging permissions: contents: read uses: "./.github/workflows/docker_packaging_jobs.yml" with: dockerTag: nightly snap_packaging_jobs: name: Snap packaging permissions: contents: read uses: "./.github/workflows/snap_packaging_jobs.yml" secrets: LAUNCHPAD_CREDENTIALS: "${{ secrets.LAUNCHPAD_CREDENTIALS }}" create_changelog: name: Create changelog permissions: contents: read uses: "./.github/workflows/create_changelog.yml" ############################ #### deploy jobs ### ############################ docker_deploy_jobs: name: Deploy docker images permissions: contents: read needs: - standard_tests_jobs - extended_tests_jobs - docker_packaging_jobs uses: "./.github/workflows/deploy_docker_images.yml" secrets: DOCKERHUB_TOKEN: "${{ secrets.DOCKERHUB_TOKEN }}" with: dockerTag: nightly snap_deploy_jobs: name: Deploy snaps permissions: contents: read needs: - standard_tests_jobs - extended_tests_jobs - snap_packaging_jobs uses: "./.github/workflows/deploy_snaps.yml" secrets: SNAPCRAFTCFG: "${{ secrets.SNAPCRAFTCFG }}" with: snapReleaseChannel: edge ############################ #### rerun job ### ############################ re-run: name: Re-run needs: - standard_tests_jobs - extended_tests_jobs - docker_packaging_jobs - snap_packaging_jobs - create_changelog - docker_deploy_jobs - snap_deploy_jobs if: failure() && fromJSON(github.run_attempt) < 3 permissions: actions: write checks: write runs-on: ubuntu-latest steps: - env: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ github.token }} GH_DEBUG: api run: gh workflow run rerun.yml -F run_id=${{ github.run_id }} shell: bash ########################### #### notify ### ########################### notify: name: Notify needs: - re-run # Returns true when any previous step of a job fails. If you have a chain of dependent # jobs, failure() returns true if any ancestor job fails. if: failure() && (needs.re-run.result == 'skipped' || needs.re-run.result == 'failure') uses: "./.github/workflows/notify_nightly.yml" permissions: actions: read secrets: MATTERMOST_PUBLIC_CERTBOT_CHANNEL_WEBHOOK: "${{ secrets.MATTERMOST_PUBLIC_CERTBOT_CHANNEL_WEBHOOK }}"