From a7b18915016a1a16e201e9e39926bda318e9a180 Mon Sep 17 00:00:00 2001 From: "Shkar T. Noori" Date: Mon, 14 Feb 2022 09:37:47 +0000 Subject: [PATCH] Run on github runners --- .github/workflows/deploy-base.yaml | 2 +- .github/workflows/deploy-dev.yaml | 37 ++++++++++++++++-------- .github/workflows/deploy-production.yaml | 35 +++++++++++++++------- 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy-base.yaml b/.github/workflows/deploy-base.yaml index 64ea605..1147efd 100644 --- a/.github/workflows/deploy-base.yaml +++ b/.github/workflows/deploy-base.yaml @@ -23,7 +23,7 @@ env: jobs: deploy: timeout-minutes: 10 - runs-on: [self-hosted, ubuntu-focal] + runs-on: ubuntu-20.04 environment: url: ${{ inputs.env_url }} name: ${{ inputs.env_name }} diff --git a/.github/workflows/deploy-dev.yaml b/.github/workflows/deploy-dev.yaml index b61eea5..da79496 100644 --- a/.github/workflows/deploy-dev.yaml +++ b/.github/workflows/deploy-dev.yaml @@ -9,7 +9,7 @@ on: - ".vscode/**" concurrency: - group: deploy-${{ github.ref }} + group: deploy-dev cancel-in-progress: true jobs: @@ -30,17 +30,30 @@ jobs: test: uses: ditkrg/dit-digital-service-manual/.github/workflows/tests-base.yaml@dev - build: - uses: ditkrg/common-github-workflows/.github/workflows/build-push-image.yaml@main - needs: [setup, test] - with: - tags: |- - ${{ needs.setup.outputs.image }} - ${{ needs.setup.outputs.image-sha }} - cache-from: type=registry,ref=${{ needs.setup.outputs.image }} - secrets: - username: ${{ secrets.HARBOR_USER }} - password: ${{ secrets.HARBOR_TOKEN }} + build-push: + name: Build and Push + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Registry + uses: docker/login-action@v1 + with: + registry: reg.dev.krd + username: ${{ secrets.HARBOR_USER }} + password: ${{ secrets.HARBOR_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v2 + with: + push: true + tags: |- + ${{ needs.setup.outputs.image }} + ${{ needs.setup.outputs.image-sha }} + cache-from: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache + cache-to: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache,mode=max deploy: uses: ditkrg/dit-digital-service-manual/.github/workflows/deploy-base.yaml@dev diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index fdc13b6..a5ce3fb 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -28,17 +28,30 @@ jobs: test: uses: ditkrg/dit-digital-service-manual/.github/workflows/tests-base.yaml@main - build: - uses: ditkrg/common-github-workflows/.github/workflows/build-push-image.yaml@main - needs: [setup, test] - with: - tags: |- - ${{ needs.setup.outputs.image }} - ${{ needs.setup.outputs.image-sha }} - cache-from: type=registry,ref=${{ needs.setup.outputs.image }} - secrets: - username: ${{ secrets.HARBOR_USER }} - password: ${{ secrets.HARBOR_TOKEN }} + build-push: + name: Build and Push + runs-on: ubuntu-20.04 + timeout-minutes: 10 + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Registry + uses: docker/login-action@v1 + with: + registry: reg.dev.krd + username: ${{ secrets.HARBOR_USER }} + password: ${{ secrets.HARBOR_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@v2 + with: + push: true + tags: |- + ${{ needs.setup.outputs.image }} + ${{ needs.setup.outputs.image-sha }} + cache-from: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache + cache-to: type=registry,ref=${{ needs.setup.outputs.image }}-buildcache,mode=max deploy: uses: ditkrg/dit-digital-service-manual/.github/workflows/deploy-base.yaml@main