Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
4101eb8c04 | |||
fd417dc0b5 | |||
9bc6121ef9 | |||
aa54bb7692 |
2 changed files with 2 additions and 59 deletions
|
@ -1,58 +0,0 @@
|
|||
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
|
||||
|
||||
docker-build:
|
||||
runs-on: host
|
||||
needs:
|
||||
- release
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.h2-invent.com
|
||||
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
|
||||
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
tags: git.h2-invent.com/public-system-design/alpine-php8-cron-webserver:${{ needs.release.outputs.version }},git.h2-invent.com/public-system-design/alpine-php8-cron-webserver:latest
|
|
@ -1,4 +1,5 @@
|
|||
FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:3.20.10
|
||||
ARG VERSION
|
||||
FROM git.h2-invent.com/public-system-design/alpine-php8-webserver:${VERSION}
|
||||
ARG VERSION
|
||||
|
||||
LABEL Version="${VERSION}" \
|
||||
|
|
Loading…
Add table
Reference in a new issue