From dd8c615cd06677933d1c07cdaa0016b0d0f2c4d1 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 5 Feb 2024 23:00:48 +0000 Subject: [PATCH] =?UTF-8?q?.github/ISSUE=5FTEMPLATE/build.yaml=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/build.yaml | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/build.yaml diff --git a/.github/ISSUE_TEMPLATE/build.yaml b/.github/ISSUE_TEMPLATE/build.yaml new file mode 100644 index 0000000..7013a1d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/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/simon/photobox-server:${{ steps.meta.outputs.REPO_VERSION }} \ No newline at end of file