Skip to content

Commit

Permalink
Added push on tag GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
marhode committed Sep 18, 2024
1 parent f5d70ea commit 2db891a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/moodletools-build-and-push-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Build and push Docker Image on Tag

on:
push:
tags:
- 'moodle-tools-[0-9]+.[0-9]+.[0-9]+*'
jobs:
pre_build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
suffix: ${{ steps.tag.outputs.suffix }}
steps:
- name: Filter Tag name
uses: olegtarasov/[email protected]
id: tag
with:
tagRegex: "(?<tag>[0-9]+.[0-9]+.[0-9]+)(?<suffix>-.*)"
build_and_push:
permissions:
packages: write
security-events: write
actions: read
contents: read
needs: pre_build
uses: hpi-schul-cloud/infra-tools/.github/workflows/build-and-push.yaml@master
with:
registry: ghcr.io
image: dbildungsplattform/moodle-tools
tag: ${{ needs.pre_build.outputs.tag }}
image_name: "moodle-tools"
context: "./moodle-tools/"

0 comments on commit 2db891a

Please sign in to comment.