From da61ec667a3ebcdc7b8e261d9a0439e2fd8b1ae4 Mon Sep 17 00:00:00 2001 From: Jamie Schouten Date: Fri, 13 Sep 2024 20:02:49 +0000 Subject: [PATCH] Add .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..709b181 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,40 @@ +name: build + +on: + workflow_call: + inputs: + tag: + required: false + type: string + default: latest + secrets: + username: + required: false + type: string + default: ${{ secrets.REGISTRY_USERNAME }} + password: + required: false + type: string + default: ${{ secrets.REGISTRY_PASSWORD }} + +jobs: + build: + runs-on: ubuntu-24.04 + container: + image: git.qlic.nl/qlic/builder:latest + credentials: + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: git.qlic.nl + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - name: Build + run: docker build . -t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ inputs.tag }} -t ${{ vars.REGISTRY }}/${{ gitea.repository }}:${{ gitea.sha }} + - name: Push + run: docker push ${{ vars.REGISTRY }}/${{ gitea.repository }} --all-tags