Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/docker_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Docker nightly images"

on:
# Build Docker nightly images every day
schedule:
- cron: '0 0 * * *'
# Enable manual run
workflow_dispatch:

jobs:
build-main:
name: "Build main branch"
if: ${{ github.repository == 'glpi-project/glpi' }}
uses: "glpi-project/docker-images/.github/workflows/glpi.yml@main"
secrets: inherit
with:
push: true
glpi-version: "main"
image-tag: "dev-nightly"

build-11:
name: "Build 11.0/bugfixes branch"
if: ${{ github.repository == 'glpi-project/glpi' }}
uses: "glpi-project/docker-images/.github/workflows/glpi.yml@main"
secrets: inherit
with:
push: true
glpi-version: "11.0/bugfixes"
image-tag: "11.0-nightly"

build-10:
name: "Build 10.0/bugfixes branch"
if: ${{ github.repository == 'glpi-project/glpi' }}
uses: "glpi-project/docker-images/.github/workflows/glpi.yml@main"
secrets: inherit
with:
push: true
glpi-version: "10.0/bugfixes"
image-tag: "10.0-nightly"
use-legacy-marketplace-path: true
22 changes: 21 additions & 1 deletion .github/workflows/docker_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,25 @@ on:
- "published"

jobs:
prepare:
name: "Prepare"
runs-on: "ubuntu-latest"
outputs:
use-legacy-marketplace-path: ${{ steps.detect.outputs.use_legacy }}
steps:
- name: "Detect v10.x release"
id: "detect"
run: |
TAG="${{ github.event.release.tag_name }}"
MAJOR=$(echo "$TAG" | cut --delimiter='.' --fields=1)
if [[ "$MAJOR" = "10" ]]; then
echo "use_legacy=true" >> $GITHUB_OUTPUT
else
echo "use_legacy=false" >> $GITHUB_OUTPUT
fi

trigger-docker-releases:
needs: [prepare]
permissions:
contents: "read"
name: "Trigger Docker releases"
Expand All @@ -15,4 +33,6 @@ jobs:
# can use the inherit keyword to implicitly pass the secrets.
secrets: inherit
with:
glpi-version: "${{ github.event.release.tag_name }}"
push: true
glpi-version: "${{ github.event.release.tag_name }}"
use-legacy-marketplace-path: ${{ needs.prepare.outputs.use-legacy-marketplace-path == 'true' }}