Create Harness CI inputset for split_synchronizer #114
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
| name: docker | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| docker: | |
| name: Build Docker image | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| app: | |
| - synchronizer | |
| - proxy | |
| fips_mode: | |
| - enabled | |
| - disabled | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: amd64,arm64 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_RO_TOKEN }} | |
| - name: Configure AWS credentials | |
| if: ${{ github.event_name == 'push' }} | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ vars.ECR_TESTING_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - name: Login to Amazon ECR | |
| if: ${{ github.event_name == 'push' }} | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| - name: Get version | |
| run: echo "VERSION=$(awk '/^const Version/{gsub(/"/, "", $4); print $4}' splitio/version.go)" >> $GITHUB_ENV | |
| - name: Docker Build and Push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.${{ matrix.app }} | |
| push: ${{ github.event_name == 'push' }} | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ${{ vars.ECR_TESTING_URL }}/split-${{ matrix.app }}${{ matrix.fips_mode == 'enabled' && '-fips' || ''}}:${{ env.VERSION }} | |
| ${{ vars.ECR_TESTING_URL }}/split-${{ matrix.app }}${{ matrix.fips_mode == 'enabled' && '-fips' || '' }}:latest | |
| build-args: | | |
| FIPS_MODE=${{ matrix.fips_mode }} |