From 5baa58347bb930bf2d182554ccc01eb18e924a1d Mon Sep 17 00:00:00 2001 From: ayoubl96 Date: Wed, 31 Dec 2025 17:46:16 +0100 Subject: [PATCH] update pipeline --- .gitea/workflows/publish-package.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/publish-package.yml b/.gitea/workflows/publish-package.yml index 1e6d6f3..5d2e36b 100644 --- a/.gitea/workflows/publish-package.yml +++ b/.gitea/workflows/publish-package.yml @@ -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 + - 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 + - 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" -