Skip to content

Commit

Permalink
build workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Aug 2, 2024
1 parent 7eb25fe commit f1138c0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docker-build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Build and publish docker image

on:
push:
branches:
- docker-build

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: |
./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
5 changes: 5 additions & 0 deletions docker-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

echo "Building docker image for translate2:${1:-latest}"

docker build -t ghcr.io/nextcloud/translate2:latest .

0 comments on commit f1138c0

Please sign in to comment.