From f2cd3fa910cd8334785d5bdf46aa2c36052e6f19 Mon Sep 17 00:00:00 2001 From: Taran Date: Tue, 11 Aug 2026 14:39:52 +0400 Subject: [PATCH] ci: publish and deploy on merge to development instead of main The Docker Image Publish workflow now triggers on push to `development` rather than `main`. Tag (`v*`) behaviour is unchanged. Effect: merge -> development : builds, pushes gateway: + gateway:dev-latest, bumps the digest in gitops, triggers the dev cluster deploy tag v* : builds, pushes gateway: + gateway:latest, triggers the Ansible VM deploy merge -> main : no longer publishes or deploys `:latest` remains tag-driven and is untouched by this change. Also renames the deploy-dev step labels and token id from "(main)" to "(development)" so they match what actually triggers them. The `git push origin main` on line 118 is the gitops repo's default branch and is deliberately left alone. --- .github/workflows/docker-publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f7b1782..5fc4db5 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -8,7 +8,7 @@ env: on: push: branches: - - main + - development tags: - v* @@ -173,8 +173,8 @@ jobs: runs-on: ubuntu-latest steps: - - name: Generate token for infrastructure dispatch (main) - id: infra-dispatch-token-main + - name: Generate token for infrastructure dispatch (development) + id: infra-dispatch-token-dev uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2 with: app-id: ${{ secrets.GH_APP_ID }} @@ -182,11 +182,11 @@ jobs: owner: getoptimum repositories: infrastructure - - name: Trigger Ansible deploy (main) + - name: Trigger Ansible deploy (development) run: | gh api repos/getoptimum/infrastructure/dispatches \ -f event_type=deploy_gateways \ -f "client_payload[tag]=dev-latest" \ -f "client_payload[digest]=${{ needs.docker.outputs.digest }}" env: - GH_TOKEN: ${{ steps.infra-dispatch-token-main.outputs.token }} + GH_TOKEN: ${{ steps.infra-dispatch-token-dev.outputs.token }}