diff --git a/.github/workflows/build-nocache.yml b/.github/workflows/build-nocache.yml new file mode 100644 index 0000000000..901e6111aa --- /dev/null +++ b/.github/workflows/build-nocache.yml @@ -0,0 +1,36 @@ +name: Build No Cache + +on: + workflow_dispatch: + schedule: + - cron: "30 12 * * 0" + # Will run once a week on Sunday afternoon + +jobs: + build-no-cache: + outputs: + docker-image-tag: ${{ steps.build-image.outputs.tag }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + name: Checkout + + - name: Build without cache and push docker image + id: build-image + uses: DFE-Digital/github-actions/build-docker-image@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + context: . + reuse-cache: false + snyk-token: ${{ secrets.SNYK_TOKEN }} + + - name: Notify slack on failure + uses: rtCamp/action-slack-notify@master + if: ${{ failure() }} + with: + SLACK_USERNAME: CI Deployment + SLACK_COLOR: failure + SLACK_ICON_EMOJI: ":github-logo:" + SLACK_TITLE: "Build failure" + SLACK_MESSAGE: ":alert: Rebuild docker cache failure :sadparrot:" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 215b4316c0..cc060fdc20 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,6 +51,7 @@ jobs: docker-repository: ghcr.io/dfe-digital/apply-for-qualified-teacher-status github-token: ${{ secrets.GITHUB_TOKEN }} snyk-token: ${{ secrets.SNYK_TOKEN }} + max-cache: true rspec_system: name: Rspec System