Skip to content

Sort the sub list alphabetically (#7) #12

Sort the sub list alphabetically (#7)

Sort the sub list alphabetically (#7) #12

Workflow file for this run

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [ master, main ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: src/Dockerfile-FrontEnd
image: ghcr.io/livingskyschooldivision/subnotify-frontend
context: ./src/
- dockerfile: src/Dockerfile-Notifier
image: ghcr.io/livingskyschooldivision/subnotify-notifier
context: ./src/
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Set current date as env variable
run: echo "IMAGETIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/[email protected]
- name: Setup Docker buildx
uses: docker/[email protected]
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ matrix.image }}
tags: |
latest
${{ env.IMAGETIMESTAMP }}
- name: Build and push Docker image
id: build-and-push
uses: docker/[email protected]
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Notify teams channel on failure
if: ${{ success() }}
uses: jdcargile/[email protected]
with:
github-token: ${{ github.token }}
ms-teams-webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK }}
notification-summary: "${{ github.repository }} - Build succeeded 😊 - ${{ env.IMAGETIMESTAMP }}"
notification-color: 008800
timezone: America/Regina
- name: Notify teams channel on success
if: ${{ failure() }}
uses: jdcargile/[email protected]
with:
github-token: ${{ github.token }}
ms-teams-webhook-uri: ${{ secrets.MSTEAMS_WEBHOOK }}
notification-summary: "⚠️ ${{ github.repository }} - Build FAILED ☹️"
notification-color: FF0000
timezone: America/Regina