From c134b6ef1eba19dbaee4a17571da245168c4c9a0 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Fri, 3 Nov 2023 22:45:50 +0600 Subject: [PATCH] :wrench: Created simple workflow for build and publish images --- .gitea/workflows/build-image.yaml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitea/workflows/build-image.yaml diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml new file mode 100644 index 0000000..b7f0dad --- /dev/null +++ b/.gitea/workflows/build-image.yaml @@ -0,0 +1,36 @@ +--- +name: Create and publish a Docker image +on: + publish: + branches: + - master + - develop + - release + push: + tags: + - v* + +env: + REGISTRY: source.toby3d.me + IMAGE_NAME: ${{ gitea.repository }} + +jobs: + build-image: + runs-on: ubuntu-latest + env: + DOCKER_USERNAME: toby3d + steps: + - name: Set up QEMU + uses: https://github.com/docker/setup-qemu-action@v3 + - name: Set up Docker BuildX + uses: https://github.com/docker/setup-buildx-action@v3 + - name: Login to registry + uses: https://github.com/docker/login-action@v3 + with: + username: ${{ env.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push + uses: https://github.com/docker/build-push-action@v5 + with: + push: true + tags: user/app:latest