bglug.it/.gitea/workflows/build_and_push.yaml
paspo 0b7b7adb76
All checks were successful
Container Publish / build-image (push) Successful in 27m25s
2
2024-07-27 20:33:05 +02:00

68 lines
1.9 KiB
YAML

---
name: Container Publish
on:
push:
# tags:
# - 'live'
schedule:
- cron: "0 12 * * *"
jobs:
build-image:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: actions/cache/restore@v4
with:
path: |
resources/
key: bglug-it-hugo-resources
- name: Build Hugo
uses: lowply/build-hugo@v0.129.0
with:
args: --gc --minify --cleanDestinationDir
- uses: actions/cache/save@v4
with:
path: |
resources/
key: bglug-it-hugo-resources
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
# - name: Login to registry
# uses: docker/login-action@v3
# with:
# registry: git.libreschool.org
# username: ${{ secrets.REGISTRY_USER }}
# password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and publish
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: false
tags: git.libreschool.org/paspo/bglug.it:latest
- name: send mattermost notification
uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
TEXT: |
:white_check_mark: `${{ github.repository }}` A new container image has been pushed to `git.libreschool.org/paspo/bglug.it:latest`
MATTERMOST_ICON: https://cdn3.iconfinder.com/data/icons/system-basic-vol-4-1/20/icon-note-attention-alt3-512.png