diff --git a/.forgejo/workflows/build-and-push-release.yaml b/.forgejo/workflows/build-and-push-release.yaml index 7f641be5..3790cdfe 100644 --- a/.forgejo/workflows/build-and-push-release.yaml +++ b/.forgejo/workflows/build-and-push-release.yaml @@ -1,6 +1,7 @@ on: - release: - types: [published] + push: + tags: + - '*' jobs: unit-tests: runs-on: docker @@ -8,7 +9,7 @@ jobs: image: mcr.microsoft.com/dotnet/sdk:8.0-alpine steps: - name: Clone repository - run: git clone https://iceshrimp.dev/iceshrimp/Iceshrimp.NET.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp + run: git clone ${{ github.event.repository.clone_url }} --branch=${{ github.ref_name }} --depth=1 /iceshrimp - name: Run unit tests run: | cd /iceshrimp @@ -41,11 +42,15 @@ jobs: registry: iceshrimp.dev username: ${{ github.actor }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Set environment variables + shell: bash + run: | + echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" - name: Build and push uses: https://code.forgejo.org/docker/build-push-action@v5 with: push: true - tags: iceshrimp.dev/iceshrimp/iceshrimp.net:${{ github.event.release.name }} + tags: iceshrimp.dev/${{ env.REPO }}:${{ github.ref_name }} target: image-aot platforms: linux/amd64,linux/arm64 provenance: false diff --git a/.forgejo/workflows/build-and-push.yaml b/.forgejo/workflows/build-and-push.yaml index 120b7456..4076434d 100644 --- a/.forgejo/workflows/build-and-push.yaml +++ b/.forgejo/workflows/build-and-push.yaml @@ -9,7 +9,7 @@ jobs: image: mcr.microsoft.com/dotnet/sdk:8.0-alpine steps: - name: Clone repository - run: git clone https://iceshrimp.dev/iceshrimp/Iceshrimp.NET.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp + run: git clone ${{ github.event.repository.clone_url }} --branch=${{ github.ref_name }} --depth=1 /iceshrimp - name: Run unit tests run: | cd /iceshrimp @@ -42,11 +42,16 @@ jobs: registry: iceshrimp.dev username: ${{ github.actor }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Set environment variables + shell: bash + run: | + echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}" - name: Build and push uses: https://code.forgejo.org/docker/build-push-action@v5 with: push: true - tags: iceshrimp.dev/iceshrimp/iceshrimp.net:dev + tags: iceshrimp.dev/${{ env.REPO }}:${{ github.ref_name }} + target: image-jit platforms: linux/amd64,linux/arm64 provenance: false cache-from: type=local,src=/buildkit-cache diff --git a/.forgejo/workflows/test-build.yaml b/.forgejo/workflows/test-build.yaml index da4c6888..b0d435ae 100644 --- a/.forgejo/workflows/test-build.yaml +++ b/.forgejo/workflows/test-build.yaml @@ -9,7 +9,7 @@ jobs: image: mcr.microsoft.com/dotnet/sdk:8.0-alpine steps: - name: Clone repository - run: git clone https://iceshrimp.dev/iceshrimp/Iceshrimp.NET.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp + run: git clone ${{ github.event.repository.clone_url }} --branch=${{ github.ref_name }} --depth=1 /iceshrimp - name: Build backend & frontend run: | cd /iceshrimp/Iceshrimp.Backend