Fix lint error in main.go #41
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: Publish | |
| on: | |
| - push | |
| - workflow_dispatch | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish: | |
| name: Build and Publish to ECR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Git clone the repository | |
| uses: actions/checkout@v4 | |
| - name: configure aws credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: arn:aws:iam::749980637880:role/core-ci | |
| aws-region: us-east-2 | |
| - name: Login to Amazon ECR | |
| id: login-ecr | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| - name: Write secrets | |
| env: | |
| SP_CERT_PEM_B64: ${{ secrets.SP_CERT_PEM_B64 }} | |
| SP_KEY_PEM_B64: ${{ secrets.SP_KEY_PEM_B64 }} | |
| DOT_ENV_B64: ${{ secrets.DOT_ENV_B64 }} | |
| run: | | |
| mkdir keys | |
| echo $SP_CERT_PEM_B64 | base64 --decode > keys/sp-cert.pem | |
| echo $SP_KEY_PEM_B64 | base64 --decode > keys/sp-key.pem | |
| echo $DOT_ENV_B64 | base64 --decode > .env | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build, tag, and push docker image to Amazon ECR | |
| env: | |
| REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
| REPOSITORY: core | |
| run: | | |
| export IMAGE_TAG=auth2 | |
| docker buildx build \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --cache-from $REGISTRY/$REPOSITORY:$IMAGE_TAG \ | |
| -t $REGISTRY/$REPOSITORY:$IMAGE_TAG \ | |
| --build-arg BUILDKIT_INLINE_CACHE=1 \ | |
| --push . |