From 6f80d41b28e80b77000ec0ff5184b46d4c3b8485 Mon Sep 17 00:00:00 2001 From: Kattyan Date: Mon, 18 Nov 2024 00:56:10 +0900 Subject: [PATCH] format --- .github/workflows/deploy.yml | 84 ++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2889d17..73a20fc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,45 +15,45 @@ jobs: id-token: write steps: - - uses: actions/checkout@v4 - - - id: auth - uses: google-github-actions/auth@v2 - with: - token_format: access_token - workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} - service_account: ${{ secrets.SERVICE_ACCOUNT }} - - - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@v2 - - - name: Login to GAR - uses: docker/login-action@v3 - with: - registry: ${{ env.REGION }}-docker.pkg.dev - username: oauth2accesstoken - password: ${{ steps.auth.outputs.access_token }} - - - name: Configure Docker for Artifact Registry - run: | - gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev - - - name: Build and push Docker image - env: - LITESTREAM_BUCKET: ${{ secrets.LITESTREAM_BUCKET }} - run: | - docker build \ - --build-arg LITESTREAM_BUCKET=$LITESTREAM_BUCKET \ - -t ${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.sha }} \ - . - docker push ${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.sha }} - - - name: Deploy to Cloud Run - run: | - gcloud run deploy ${{ env.IMAGE }} \ - --image ${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.sha }} \ - --port="3000" \ - --region ${{ env.REGION }} \ - --max-instances=1 \ - --allow-unauthenticated \ - --set-env-vars=LITESTREAM_BUCKET=${{ secrets.LITESTREAM_BUCKET }} + - uses: actions/checkout@v4 + + - id: auth + uses: google-github-actions/auth@v2 + with: + token_format: access_token + workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} + service_account: ${{ secrets.SERVICE_ACCOUNT }} + + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v2 + + - name: Login to GAR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGION }}-docker.pkg.dev + username: oauth2accesstoken + password: ${{ steps.auth.outputs.access_token }} + + - name: Configure Docker for Artifact Registry + run: | + gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev + + - name: Build and push Docker image + env: + LITESTREAM_BUCKET: ${{ secrets.LITESTREAM_BUCKET }} + run: | + docker build \ + --build-arg LITESTREAM_BUCKET=$LITESTREAM_BUCKET \ + -t ${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.sha }} \ + . + docker push ${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.sha }} + + - name: Deploy to Cloud Run + run: | + gcloud run deploy ${{ env.IMAGE }} \ + --image ${{ env.REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE }}:${{ github.sha }} \ + --port="3000" \ + --region ${{ env.REGION }} \ + --max-instances=1 \ + --allow-unauthenticated \ + --set-env-vars=LITESTREAM_BUCKET=${{ secrets.LITESTREAM_BUCKET }}