diff --git a/.github/workflows/docker-build-publish.yml b/.github/workflows/docker-build-publish.yml new file mode 100644 index 0000000..a60d0f7 --- /dev/null +++ b/.github/workflows/docker-build-publish.yml @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later + +name: Build and publish docker image + +on: + push: + branches: + - docker-build + +env: + APP_NAME: translate2 + +concurrency: + group: integration-test-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + +jobs: + transcription: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV + + - name: Build Docker images + run: | + pwd + ls -la + ./docker_build.sh ${{ env.APP_VERSION }} + + # - name: Login to DockerHub + # uses: docker/login-action@v2 + # with: + # registry: ghcr.io + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + + # - name: Push Docker images + # run: | + # ./docker_build.sh ${GITHUB_REF##*/v} 1 diff --git a/docker-build.sh b/docker-build.sh new file mode 100644 index 0000000..021da22 --- /dev/null +++ b/docker-build.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +echo "Building docker image for translate2:${1:-latest}" + +docker build -t ghcr.io/nextcloud/translate2:latest .