From 7e86015bd8cf121c7e2e7f9e8588172c04f2c9c5 Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Fri, 23 Dec 2022 17:21:55 -0300 Subject: [PATCH] Add image PFTP to build jobs --- .github/workflows/workflow_development.yml | 43 ++++++++++++++++++++++ .github/workflows/workflow_production.yml | 40 ++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/.github/workflows/workflow_development.yml b/.github/workflows/workflow_development.yml index bb9475d..dd3809f 100644 --- a/.github/workflows/workflow_development.yml +++ b/.github/workflows/workflow_development.yml @@ -5,16 +5,19 @@ on: create: branches-ignore: - main + - 'releases/**' tags-ignore: - '**' push: branches-ignore: - main + - 'releases/**' tags-ignore: - '**' pull_request: branches-ignore: - main + - 'releases/**' tags-ignore: - '**' @@ -33,6 +36,10 @@ jobs: id: on_changes with: filters: | + pftp: + - 'web/**' + - 'server/**' + - 'docker/pftp/**' web: - 'web/**' - 'docker/nginx/**' @@ -40,6 +47,42 @@ jobs: - 'server/**' pureftpd: - 'docker/pure-ftpd/**' + Build-PFTP: + needs: [filter-paths] + if: ${{ needs.filter-paths.outputs.pftp == 'true' }} + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: PFTP Docker meta + id: pftp_meta + uses: docker/metadata-action@v4 + with: + images: ${{ secrets.ATP_REGISTRY_URL }}/pftp/pftp + tags: ${{ env.GITHUB_REF_NAME }} + - name: Login Registry + uses: docker/login-action@v2 + with: + username: ${{ secrets.ATP_REGISTRY_URL }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - + name: Build and push PFTP + uses: docker/build-push-action@v3 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.pftp_meta.outputs.tags }} + file: docker/pftp/Dockerfile + platforms: linux/amd64,linux/arm64 Build-Frontend: needs: [filter-paths] if: ${{ needs.filter-paths.outputs.web == 'true' }} diff --git a/.github/workflows/workflow_production.yml b/.github/workflows/workflow_production.yml index 2f0c58c..91f9037 100644 --- a/.github/workflows/workflow_production.yml +++ b/.github/workflows/workflow_production.yml @@ -21,6 +21,10 @@ jobs: id: on_changes with: filters: | + pftp: + - 'web/**' + - 'server/**' + - 'docker/pftp/**' web: - 'web/**' - 'docker/nginx/**' @@ -28,6 +32,42 @@ jobs: - 'server/**' pureftpd: - 'docker/pure-ftpd/**' + Build-PFTP: + needs: [filter-paths] + if: ${{ needs.filter-paths.outputs.pftp == 'true' }} + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: PFTP Docker meta + id: pftp_meta + uses: docker/metadata-action@v4 + with: + images: ${{ secrets.DOCKERHUB_REPOSITORY }}/pftp + tags: latest + - name: Login Registry + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - + name: Build and push PFTP + uses: docker/build-push-action@v3 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.pftp_meta.outputs.tags }} + file: docker/pftp/Dockerfile + platforms: linux/amd64,linux/arm64 Build-Frontend: needs: [filter-paths] if: ${{ needs.filter-paths.outputs.web == 'true' }}