Build No Cache #2
This file contains 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: Build No Cache | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 12 * * 0" | |
# Will run once a week on Sunday afternoon | |
jobs: | |
build-no-cache: | |
runs-on: ubuntu-latest | |
environment: | |
name: development | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Fetch secrets from key vault | |
uses: azure/CLI@v2 | |
id: keyvault-yaml-secret | |
with: | |
inlineScript: | | |
SLACK_WEBHOOK=$(az keyvault secret show --name "SLACK-WEBHOOK" --vault-name "${{ secrets.INF_KEY_VAULT }}" --query "value" -o tsv) | |
echo "::add-mask::$SLACK_WEBHOOK" | |
echo "SLACK_WEBHOOK=$SLACK_WEBHOOK" >> $GITHUB_OUTPUT | |
- 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: . | |
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: ${{ steps.keyvault-yaml-secret.outputs.SLACK_WEBHOOK }} |