#74 ベースイメージの変更 #5
Workflow file for this run
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: Backend Container Build and Push | |
| on: | |
| push: | |
| branches: | |
| - 74-base-image | |
| paths: | |
| - 'example/backend/app/**' | |
| jobs: | |
| deploy: | |
| runs-on: arc-runner-set | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Login to ECR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ACCOUNTID.dkr.ecr.ap-northeast-2.amazonaws.com | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: kubernetes | |
| driver-opts: | | |
| namespace=arc-runners | |
| - name: Set image tag (date) | |
| run: echo "IMAGE_TAG=$(TZ='Asia/Tokyo' date +'%Y%m%d%H%M')" >> $GITHUB_ENV | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| env: | |
| DOCKER_BUILD_SUMMARY: false | |
| with: | |
| context: ./example/backend/app | |
| push: true | |
| provenance: false | |
| tags: ACCOUNTID.dkr.ecr.ap-northeast-2.amazonaws.com/backend:${{ env.IMAGE_TAG }} |