Update .gitea/workflows/build-packages.yaml
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s Details

This commit is contained in:
DrMaxNix 2024-04-20 16:15:28 +02:00
parent d89298777a
commit 64dd25a6a2
1 changed files with 27 additions and 11 deletions

View File

@ -4,18 +4,34 @@ on:
types:
- published
env:
REGISTRY: git.tjdev.de
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-publish-docker-packages:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: https://github.com/actions/checkout@v3
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
- name: Login to Git Container Registry
uses: https://github.com/docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.GIT_PACKREG_USERNAME }}
password: ${{ secrets.GIT_PACKREG_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}