update pipeline
Some checks failed
Build and Publish / build (push) Failing after 4s

This commit is contained in:
2025-12-31 17:46:16 +01:00
parent f0d839435f
commit 5baa58347b

View File

@@ -1,11 +1,9 @@
name: Build and Publish
on:
push:
branches:
- '**'
- "**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
@@ -14,17 +12,14 @@ jobs:
steps:
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
- name: Login al registry di Gitea
run: |
echo "${{ secrets.AUTHTOKEN }}" | docker login ${{ vars.REGISTRY_URL }} -u ${{ github.repository_owner }} --password-stdin
echo "${{ secrets.AUTHTOKEN }}" ${{ vars.REGISTRY_URL }} ${{ github.repository_owner }}
- name: Extract build artifacts
run: |
docker build --target artifacts --output type=local,dest=./out .
tar -czf build-artifact.tar.gz -C out dist/
ls -la ./out/
tar -czf build-artifact.tar.gz -C ./out/dist .
- name: Build immagine Docker
run: |
IMAGE_NAME="${{ vars.REGISTRY_URL }}/${{ github.repository }}"
@@ -35,14 +30,12 @@ jobs:
-t ${IMAGE_NAME}:latest \
.
echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_ENV
- name: Push immagine Docker
run: |
docker push ${{ env.IMAGE_NAME }}:${{ github.sha }}
docker push ${{ env.IMAGE_NAME }}:${{ github.ref_name }}
docker push ${{ env.IMAGE_NAME }}:latest
echo "Docker image pushed successfully!"
- name: Upload to Gitea Package Registry
run: |
VERSION="${GITHUB_REF_NAME:-main}"
@@ -53,4 +46,3 @@ jobs:
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/packages/generic/${REPO_NAME}/${VERSION}/build-artifact.tar.gz"
echo "Artifact uploaded to Package Registry!"
echo "Download at: ${{ github.server_url }}/${{ github.repository }}/-/packages"