open-dmarc-analyzer-docker/.gitea/workflows/lastreleased.yaml
Guillaume Lapierre d2f3f47f5c
All checks were successful
Build Main / BuildLatest (push) Successful in 12m26s
Nightly build / BuildNightly (push) Successful in 17m18s
Rebuild Last Released / BuildLatest (push) Successful in 27s
build: rebuild last released when php:8.3 base image was updated
2024-11-12 12:13:47 +01:00

57 lines
1.6 KiB
YAML

#
# Build docker image for last released version
#
name: Rebuild Last Released
run-name: ${{ gitea.actor }} running CI in the pipeline 🚀
on:
schedule:
- cron: "10 2 * * *"
jobs:
BuildLatest:
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: cth-ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the latest tag
id: get_last_tag
run: echo "LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_OUTPUT
- name: Checkout latest version
run: git checkout ${{ steps.get_last_tag.outputs.LAST_TAG }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Check if update available
id: checkupdate
uses: lucacome/docker-image-update-checker@v2.0.0
with:
base-image: php:8.3-apache
image: zeguigui/open-report-analyzer:latest
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=giteanet
if: steps.checkupdate.outputs.needs-updating == 'true'
- name: Build and push version
uses: docker/build-push-action@v5
env:
ACTIONS_RUNTIME_TOKEN: ''
with:
push: true
tags: zeguigui/open-report-analyzer:${{ steps.get_last_tag.outputs.LAST_TAG }},zeguigui/open-report-analyzer:latest
if: steps.checkupdate.outputs.needs-updating == 'true'