-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.27 KB
/
build-nocache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build No Cache
on:
workflow_dispatch:
schedule:
- cron: "30 12 * * 0"
# Will run once a week on Sunday afternoon
push:
branches:
- 2166-scan-docker-image-in-all-repositories
jobs:
build-no-cache:
env:
DOCKER_REPOSITORY: ghcr.io/dfe-digital/access-your-teaching-qualifications
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: .
docker-repository: ${{ env.DOCKER_REPOSITORY }}
max-cache: true
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 }}