diff --git a/.gitea/workflows/build-and-publish.yaml b/.gitea/workflows/build-and-publish.yaml index 2d28bf8..ed29ac5 100644 --- a/.gitea/workflows/build-and-publish.yaml +++ b/.gitea/workflows/build-and-publish.yaml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - + - uses: DeterminateSystems/determinate-nix-action@v3 - uses: DeterminateSystems/flake-checker-action@main @@ -28,19 +28,23 @@ jobs: endpoint: ${{ secrets.ATTIC_ENDPOINT }} cache: ${{ secrets.ATTIC_CACHE }} token: ${{ secrets.ATTIC_TOKEN }} - + - name: Build Docker Image via Nix Flake run: | - nix build .#dockerImage --print-build-logs + NIX_BUILD_CORES=2 nix build .#dockerImage --max-jobs=2 --print-build-logs docker load < result - + + - name: Push closure to Attic cache + run: | + attic push ${{ secrets.ATTIC_CACHE }} ./result + - name: Log in to Gitea Container Registry uses: docker/login-action@v3 with: registry: ${{ github.server_url }} username: ${{ secrets.CI_USER }} password: ${{ secrets.CI_PASSWORD }} - + - name: Tag and Push Docker Image run: | VERSION=${{ github.run_number }} @@ -57,17 +61,17 @@ jobs: docker tag $SOURCE_IMAGE $TARGET_IMAGE:latest docker push $TARGET_IMAGE:$VERSION docker push $TARGET_IMAGE:latest - + - name: Setup Helm uses: azure/setup-helm@v4 with: version: v3.14.0 - + - name: Package Helm Chart run: | VERSION=${{ github.run_number }} helm package ops/chart --version $VERSION --app-version $VERSION - + - name: Push Helm Chart to Gitea Registry run: | VERSION=${{ github.run_number }} @@ -76,4 +80,4 @@ jobs: curl -f --user "${{ secrets.CI_USER }}:${{ secrets.CI_PASSWORD }}" \ -X POST \ --upload-file ./$CHART_FILE \ - "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/helm/api/charts" + "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/helm/api/charts" \ No newline at end of file