Skip to content

Commit

Permalink
WIP try to push container image to GAR.
Browse files Browse the repository at this point in the history
  • Loading branch information
ychescale9 committed Aug 13, 2024
1 parent 21b2942 commit 55e52cd
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
# needs: [ assemble-and-check ]
# if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
env:
CONTAINER_IMAGE: ${{ secrets.GCP_CONTAINER_IMAGE }}
REGION: ${{ secrets.GCP_REGION }}
SERVICE_NAME: ${{ secrets.GCP_SERVICE_NAME }}
CPU: 4
MEMORY: 2Gi
MIN_INSTANCES: 0
MAX_INSTANCES: 4
REQUEST_TIMEOUT: 30s

steps:
- uses: actions/checkout@v4
Expand All @@ -44,11 +53,21 @@ jobs:
java-version: '22'
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: gradle/actions/setup-gradle@v4
- uses: docker/login-action@v3
# TODO move down
with:
registry: $REGION-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}
- run: ./gradlew nativeCompile --no-configuration-cache
- uses: docker/setup-buildx-action@v3
# TODO login to GAR
# - uses: docker/login-action@v3
# with:
# registry: $REGION-docker.pkg.dev
# username: _json_key
# password: ${{ secrets.GAR_JSON_KEY }}
- uses: docker/build-push-action@v6
with:
context: .
push: false # TODO push
tags: ${{ github.sha }}
push: true
tags: $CONTAINER_IMAGE:${{ github.sha }}

0 comments on commit 55e52cd

Please sign in to comment.