Skip to content

Merge branch 'master' into update-django-to-v5 #927

Merge branch 'master' into update-django-to-v5

Merge branch 'master' into update-django-to-v5 #927

Workflow file for this run

# This workflow will build a new image on GitHub Packages.
#
# References:
# - https://docs.github.com/en/actions/guides/building-and-testing-python
# - https://github.com/marketplace/actions/slack-notify
name: Building Docker containers
# Triggers the workflow on push or pull request events
on:
push:
paths-ignore:
- 'kubernetes/**'
- 'nginx/**'
- 'openssl/**'
- '.gitlab-ci.yml'
- '.gitlab/**'
pull_request:
jobs:
# initial-notification:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Initial notification
# uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
# env:
# SLACK_MESSAGE: 'Publishing image to GitHub Packages'
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# MSG_MINIMAL: true
push_image_to_github:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
with:
images: ghcr.io/${{ github.repository }}
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# final-notification:
# runs-on: ubuntu-latest
# needs: push_image_to_github
# steps:
# - uses: actions/checkout@v3
# - name: Final notification
# uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
# env:
# SLACK_MESSAGE: 'New image pushed to GitHub Packages'
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# MSG_MINIMAL: true