Try selecting own and shared shockers in single query #1454
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| types: [ opened, reopened, synchronize ] | |
| workflow_call: | |
| inputs: | |
| platforms: | |
| description: 'Platforms to build for' | |
| required: false | |
| type: string | |
| latest: | |
| description: 'Tag image as latest' | |
| required: false | |
| type: boolean | |
| default: false | |
| workflow_dispatch: | |
| name: ci-build | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run Common Unit Tests | |
| uses: ./.github/actions/test-app | |
| with: | |
| dockerfile: docker/Base.Dockerfile | |
| image: test-common | |
| target: test-common | |
| - name: Run API Integration Tests | |
| uses: ./.github/actions/test-app | |
| with: | |
| dockerfile: docker/API.Dockerfile | |
| image: api-integration-tests | |
| target: integration-test-api | |
| - name: Build API | |
| uses: ./.github/actions/build-app | |
| with: | |
| dockerfile: docker/API.Dockerfile | |
| push: ${{ github.ref_protected && github.event_name != 'pull_request' }} | |
| image: api | |
| platforms: ${{ inputs.platforms || 'linux/amd64' }} | |
| latest: ${{ inputs.latest || false }} | |
| - name: Build LiveControlGateway | |
| uses: ./.github/actions/build-app | |
| with: | |
| dockerfile: docker/LiveControlGateway.Dockerfile | |
| push: ${{ github.ref_protected && github.event_name != 'pull_request' }} | |
| image: live-control-gateway | |
| platforms: ${{ inputs.platforms || 'linux/amd64' }} | |
| latest: ${{ inputs.latest || false }} | |
| - name: Build Cron | |
| uses: ./.github/actions/build-app | |
| with: | |
| dockerfile: docker/Cron.Dockerfile | |
| push: ${{ github.ref_protected && github.event_name != 'pull_request' }} | |
| image: cron | |
| platforms: ${{ inputs.platforms || 'linux/amd64' }} | |
| latest: ${{ inputs.latest || false }} | |
| deploy-dev: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: ${{ github.ref_type == 'branch' && github.event_name != 'pull_request' && github.ref_name == 'develop' }} | |
| environment: development | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| - uses: ./.github/actions/watchtower-update | |
| with: | |
| url: ${{ vars.WATCHTOWER_URL }} | |
| token: ${{ secrets.WATCHTOWER_TOKEN }} | |
| deploy-production: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: ${{ github.ref_type == 'branch' && github.event_name != 'pull_request' && github.ref_name == 'master' }} | |
| environment: production | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| - uses: ./.github/actions/kubernetes-rollout-restart | |
| with: | |
| apiurl: ${{ secrets.KUBERNETES_APIURL }} | |
| token: ${{ secrets.KUBERNETES_TOKEN }} | |
| deployments: ${{ vars.DEPLOYMENT_NAMES }} |