57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: docker-build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: docker
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Define next tag
|
|
uses: https://github.com/paulhatch/semantic-version@v5.0.2
|
|
id: version
|
|
with:
|
|
tag_prefix: ""
|
|
major_pattern: "(MAJOR)"
|
|
minor_pattern: "(MINOR)"
|
|
change_path: .
|
|
version_format: "${major}.${minor}.${patch}"
|
|
|
|
- name: Create tag
|
|
run: |
|
|
git config --global user.name "${GITHUB_ACTOR}"
|
|
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
|
|
git tag "${{ steps.version.outputs.version }}" -m "[forgejo-action-tag]"
|
|
git push origin --tags
|
|
|
|
webserver:
|
|
runs-on: host
|
|
needs: release
|
|
steps:
|
|
- name: Build Webserver
|
|
uses: ./.github/workflows/docker-build.yml
|
|
with:
|
|
repo_name: alpine-php8-webserver
|
|
version: ${{ needs.release.outputs.version }}
|
|
|
|
cron:
|
|
runs-on: host
|
|
needs: webserver
|
|
steps:
|
|
- name: Build Cron-Webserver
|
|
uses: ./.github/workflows/docker-build.yml
|
|
with:
|
|
repo_name: alpine-php8-cron-webserver
|
|
version: ${{ needs.release.outputs.version }}
|