From 6eb92938792f6b2646592fb608cf8c755cfaac8f Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 5 Feb 2024 23:10:00 +0000 Subject: [PATCH] =?UTF-8?q?.gitea=20/=20workflows=20/=20build.yaml=20hinzu?= =?UTF-8?q?gef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea / workflows / build.yaml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea / workflows / build.yaml diff --git a/ .gitea / workflows / build.yaml b/ .gitea / workflows / build.yaml new file mode 100644 index 0000000..cf72c70 --- /dev/null +++ b/ .gitea / workflows / build.yaml @@ -0,0 +1,42 @@ +name: Build and push image + +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest:docker://catthehacker/ubuntu:act-latest + container: + image: catthehacker/ubuntu:act-latest + #defaults: + # run: + # working-directory: /repo + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # all history for all branches and tags + + - name: Login to gitea.simonzeyer.de Repo + uses: docker/login-action@v2 + with: + registry: gitea.simonzeyer.de + username: ${{ secrets.DOCKER_REPO_USER }} + password: ${{ secrets.DOCKER_REPO_PASSWD }} + + - name: Get Meta + id: meta + run: | + echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT + echo REPO_VERSION=$(git describe --always | sed 's/^v//') >> $GITHUB_OUTPUT + - name: Build and push + uses: docker/build-push-action@v4 + env: + ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 + with: + context: . + file: ./Dockerfile + push: true + tags: | + gitea.simonzeyer.de/schuelerlabor-cleverlab/smarti:${{ steps.meta.outputs.REPO_VERSION }} \ No newline at end of file