Compare commits

...

5 Commits

Author SHA1 Message Date
8d0dda0fa9 Merge pull request 'fix/ci-tag' (#47) from fix/ci-tag into master
Reviewed-on: #47
2023-06-22 18:38:34 +02:00
777ae330ad remove master branch restriction on docker-build
All checks were successful
Compile the repository / compile (pull_request) Successful in 10s
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.
2023-06-19 23:34:25 +02:00
111ccaa880 simplify the test compile
All checks were successful
Compile the repository / compile (pull_request) Successful in 11s
2023-06-19 23:28:39 +02:00
c00453d3d3 push all tags of an image
All checks were successful
Compile the repository / compile (pull_request) Successful in 11s
2023-06-19 23:26:56 +02:00
8a7973a2e3 compile only on PR 2023-06-19 23:26:41 +02:00
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
name: Compile the repository name: Compile the repository
on: [push] on: [pull_request]
env: env:
REGISTRY: gitea.brudi.xyz REGISTRY: gitea.brudi.xyz
IMAGE_NAME: ${{ gitea.repository }} IMAGE_NAME: ${{ gitea.repository }}
@ -14,4 +14,4 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Build Container - name: Build Container
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" . run: docker build .

View File

@ -11,7 +11,7 @@ env:
jobs: jobs:
build-docker-image: build-docker-image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: gitea.ref == 'refs/heads/master' #if: gitea.ref == 'refs/heads/master'
container: catthehacker/ubuntu:act-latest container: catthehacker/ubuntu:act-latest
permissions: permissions:
contents: read contents: read
@ -26,4 +26,4 @@ jobs:
- name: Build Container - name: Build Container
run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}". run: docker build -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" -t "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}".
- name: Push Container - name: Push Container
run: docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" run: docker push --all-tags "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"