3
0
mirror of https://github.com/pragma-/pbot.git synced 2025-12-13 04:07:27 +01:00

Only build and push for now.

This commit is contained in:
Alex Belanger 2024-03-08 21:11:11 -05:00
parent e9fc455011
commit 1fc64b2d7d
No known key found for this signature in database
GPG Key ID: 31736D2B10A5F158

View File

@ -24,18 +24,17 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 'Authenticate to Google Cloud' - name: 'Authenticate to Google Cloud'
id: 'auth' id: 'auth'
uses: 'google-github-actions/auth@v0' uses: 'google-github-actions/auth@v1'
with: with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
- name: Docker configuration - name: 'Set up Cloud SDK'
run: |- uses: 'google-github-actions/setup-gcloud@v1'
echo ${{steps.auth.outputs.access_token}} | docker login -u oauth2accesstoken --password-stdin https://gcr.io
- name: Set up GKE credentials - name: Set up GKE credentials
uses: google-github-actions/get-gke-credentials@v0 uses: google-github-actions/get-gke-credentials@v0
with: with:
@ -50,15 +49,15 @@ jobs:
run: |- run: |-
docker push "gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" docker push "gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA"
- name: Set up Kustomize # - name: Set up Kustomize
run: |- # run: |-
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 # curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize # chmod u+x ./kustomize
#
- name: Deploy image # - name: Deploy image
run: |- # run: |-
# replacing the image name in the k8s template # # replacing the image name in the k8s template
./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA # ./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA
./kustomize build . | kubectl apply -f - # ./kustomize build . | kubectl apply -f -
kubectl rollout status deployment/$DEPLOYMENT_NAME # kubectl rollout status deployment/$DEPLOYMENT_NAME
kubectl get services -o wide # kubectl get services -o wide