Refactor: application.yml 네임스페이스 통합 #8
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: CI — Build & Push | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| IMAGE_NAME: ghcr.io/rabbittick/market-ingest-streamer | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to ghcr.io | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ env.IMAGE_NAME }}:${{ github.sha }} | |
| deploy: | |
| needs: build-and-push | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GCE | |
| uses: appleboy/ssh-action@v1 | |
| with: | |
| host: ${{ secrets.GCE_HOST }} | |
| username: ${{ secrets.GCE_USER }} | |
| key: ${{ secrets.GCE_SSH_PRIVATE_KEY }} | |
| envs: GITHUB_SHA | |
| script: | | |
| sed -i "s|INGEST_IMAGE=.*|INGEST_IMAGE=ghcr.io/rabbittick/market-ingest-streamer:${GITHUB_SHA}|" ~/market-data-infra/.env | |
| ~/market-data-infra/scripts/deploy.sh |