From 8a7973a2e3ffd91ae60c874100b26f72511c17a6 Mon Sep 17 00:00:00 2001 From: mightypanders Date: Mon, 19 Jun 2023 23:26:41 +0200 Subject: [PATCH 1/4] compile only on PR --- .gitea/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/compile.yaml b/.gitea/workflows/compile.yaml index 0309d61..199daf9 100644 --- a/.gitea/workflows/compile.yaml +++ b/.gitea/workflows/compile.yaml @@ -1,5 +1,5 @@ name: Compile the repository -on: [push] +on: [pull_request] env: REGISTRY: gitea.brudi.xyz IMAGE_NAME: ${{ gitea.repository }} -- 2.40.1 From c00453d3d32255963792dbb88d51d8c44ea5f278 Mon Sep 17 00:00:00 2001 From: mightypanders Date: Mon, 19 Jun 2023 23:26:56 +0200 Subject: [PATCH 2/4] push all tags of an image --- .gitea/workflows/docker-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/docker-build.yaml b/.gitea/workflows/docker-build.yaml index fe5fe7a..26efd1d 100644 --- a/.gitea/workflows/docker-build.yaml +++ b/.gitea/workflows/docker-build.yaml @@ -26,4 +26,4 @@ jobs: - name: Build Container run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}". - name: Push Container - run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" + run: docker push --all-tags "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" -- 2.40.1 From 111ccaa8804f735a9c0df7a69981bf5c56c2c7c9 Mon Sep 17 00:00:00 2001 From: mightypanders Date: Mon, 19 Jun 2023 23:28:39 +0200 Subject: [PATCH 3/4] simplify the test compile --- .gitea/workflows/compile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/compile.yaml b/.gitea/workflows/compile.yaml index 199daf9..2fa0821 100644 --- a/.gitea/workflows/compile.yaml +++ b/.gitea/workflows/compile.yaml @@ -14,4 +14,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Build Container - run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" . + run: docker build . -- 2.40.1 From 777ae330ad326041de4447b431804dc12b46333f Mon Sep 17 00:00:00 2001 From: mightypanders Date: Mon, 19 Jun 2023 23:34:25 +0200 Subject: [PATCH 4/4] remove master branch restriction on docker-build since the pipeline is only ever called on a tag, which will by convention only be committed to the master branch, we can be reasonably sure that we are on the correct branch. Tags are independent on branches which makes it impossible to check for tag AND master branch ref at the same time. --- .gitea/workflows/docker-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/docker-build.yaml b/.gitea/workflows/docker-build.yaml index 26efd1d..2a07f26 100644 --- a/.gitea/workflows/docker-build.yaml +++ b/.gitea/workflows/docker-build.yaml @@ -11,7 +11,7 @@ env: jobs: build-docker-image: runs-on: ubuntu-latest - if: gitea.ref == 'refs/heads/master' + #if: gitea.ref == 'refs/heads/master' container: catthehacker/ubuntu:act-latest permissions: contents: read -- 2.40.1