From 8555f5eea1e6bc4d28ca6b9d52060f9de2483e19 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sun, 30 Jul 2023 12:48:58 -0400 Subject: [PATCH] .github/workflows/pkg-sftpgo.yml: use pkg-build workflow --- .github/workflows/pkg-sftpgo.yml | 43 ++++++++++++-------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/.github/workflows/pkg-sftpgo.yml b/.github/workflows/pkg-sftpgo.yml index cd069a8e..7e1a52ef 100644 --- a/.github/workflows/pkg-sftpgo.yml +++ b/.github/workflows/pkg-sftpgo.yml @@ -1,33 +1,22 @@ name: SFTPGo Service Container on: workflow_dispatch: - inputs: - version: - description: "Version tag" - required: true + pull_request: + paths: + - services/pkg/sftpgo/** + push: + branches: + - master + paths: + - services/pkg/sftpgo/** + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: main: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@master - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to GCHR - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: services/pkg/sftpgo - push: true - tags: "ghcr.io/void-linux/infra-sftpgo:${{ github.event.inputs.version }}" - labels: | - org.opencontainers.image.source=${{ github.repositoryUrl }} + uses: ./.github/workflows/pkg-build.yml + with: + service_name: sftpgo + push: ${{ endsWith(github.ref, 'master') }}