ci: create simpler pipeline #4
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: Build and Release | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| GOPRIVATE: github.com/docker | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # - name: Login to Docker Hub | |
| # uses: docker/login-action@v3 | |
| # with: | |
| # username: dockerbuildbot | |
| # password: ${{ secrets.DOCKERBUILDBOT_READ_PAT }} | |
| # | |
| # - name: Set up Docker Buildx | |
| # uses: docker/setup-buildx-action@v3 | |
| # with: | |
| # driver: cloud | |
| # endpoint: docker/platform-experience | |
| # install: true | |
| # | |
| # - name: Configure AWS Credentials | |
| # uses: aws-actions/[email protected] | |
| # with: | |
| # role-to-assume: "arn:aws:iam::710015040892:role/CicdInfraUniverse-20211122142819515300000001" | |
| # role-session-name: build_image | |
| # aws-region: us-east-1 | |
| # | |
| # - name: Login to ECR | |
| # run: | | |
| # aws ecr get-login-password | docker login --username AWS --password-stdin 710015040892.dkr.ecr.us-east-1.amazonaws.com | |
| - name: Get Current Git SHA | |
| id: git_sha | |
| run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
| - name: Build and Push Docker Image | |
| id: docker-build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64 | |
| # push: true | |
| build-args: | | |
| VERSION=${{ steps.git_sha.outputs.sha }} | |
| tags: | | |
| 710015040892.dkr.ecr.us-east-1.amazonaws.com/infra-routing/envoy:${{ steps.git_sha.outputs.sha }} | |