@@ -0,0 +1,74 @@
|
|||||||
|
name: "Build - Docker Image - RC"
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
echo $RELEASE_VERSION
|
||||||
|
echo '${{ env.RELEASE_VERSION }}' > ./public/version.txt
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/docker-ci
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.steelants.cz
|
||||||
|
username: ${{ secrets.GITEAUSER }}
|
||||||
|
password: ${{ secrets.GITEAPASSWD }}
|
||||||
|
|
||||||
|
- uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
labels: |
|
||||||
|
org.steelants.image.traffic.version=${{ env.release_version }}
|
||||||
|
tags: git.steelants.cz/jonatanrek/docker_php_base:dev
|
||||||
|
|
||||||
|
# ✅ Notifikace při úspěšném deploymentu
|
||||||
|
- name: Discord Webhook Success
|
||||||
|
if: success()
|
||||||
|
uses: tsickert/discord-webhook@v6.0.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
|
content: |
|
||||||
|
✅ Build successful!
|
||||||
|
Repo: ${{ github.repository }}
|
||||||
|
Branch: ${{ github.ref_name }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
Version: ${{ env.release_version }}
|
||||||
|
|
||||||
|
# ❌ Notifikace při neúspěšném deploymentu
|
||||||
|
- name: Discord Webhook Failure
|
||||||
|
if: failure()
|
||||||
|
uses: tsickert/discord-webhook@v6.0.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
|
content: |
|
||||||
|
❌ Build failed!
|
||||||
|
Repo: ${{ github.repository }}
|
||||||
|
Branch: ${{ github.ref_name }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
Version: ${{ env.release_version }}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: "Build - Docker Image"
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
echo $RELEASE_VERSION
|
||||||
|
echo '${{ env.RELEASE_VERSION }}' > ./public/version.txt
|
||||||
|
|
||||||
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.steelants.cz
|
||||||
|
username: ${{ secrets.GITEAUSER }}
|
||||||
|
password: ${{ secrets.GITEAPASSWD }}
|
||||||
|
|
||||||
|
- uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
labels: |
|
||||||
|
org.steelants.image.traffic.version=${{ env.release_version }}
|
||||||
|
tags: git.steelants.cz/jonatanrek/docker_php_base:${{ env.release_version }}, git.steelants.cz/jonatanrek/docker_php_base:latest
|
||||||
|
|
||||||
|
# ✅ Notifikace při úspěšném deploymentu
|
||||||
|
- name: Discord Webhook Success
|
||||||
|
if: success()
|
||||||
|
uses: tsickert/discord-webhook@v6.0.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
|
content: |
|
||||||
|
✅ Build successful!
|
||||||
|
Repo: ${{ github.repository }}
|
||||||
|
Branch: ${{ github.ref_name }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
Version: ${{ env.release_version }}
|
||||||
|
|
||||||
|
# ❌ Notifikace při neúspěšném deploymentu
|
||||||
|
- name: Discord Webhook Failure
|
||||||
|
if: failure()
|
||||||
|
uses: tsickert/discord-webhook@v6.0.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
|
content: |
|
||||||
|
❌ Build failed!
|
||||||
|
Repo: ${{ github.repository }}
|
||||||
|
Branch: ${{ github.ref_name }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
Version: ${{ env.release_version }}
|
||||||
Reference in New Issue
Block a user