Skip to content

Push image to Artifact Registry #8

Push image to Artifact Registry

Push image to Artifact Registry #8

Workflow file for this run

name: Build documentation
on: workflow_dispatch
jobs:
build-docs:
runs-on: ubuntu-latest
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
DOTNET_NOLOGO: true
GKE_CLUSTER: web-cluster
GKE_ZONE: us-central1-a
REPOSITORY_ZONE: us-central1
REPOSITORY_NAME: nodatime-org
DEPLOYMENT_NAME: nodatime-test
IMAGE: nodatime.org
steps:
- name: Check out nodatime.org
uses: actions/checkout@v4
with:
path: nodatime.org
- name: Checkout nodatime
uses: actions/checkout@v4
with:
repository: nodatime/nodatime
path: nodatime
- name: Checkout nodatime.serialization
uses: actions/checkout@v4
with:
repository: nodatime/nodatime.serialization
path: nodatime.serialization
- name: Set up Google auth
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GKE_SA_KEY }}"
- name: "Set up gcloud"
uses: "google-github-actions/setup-gcloud@v2"
- name: "Configure Docker auth"
run: |-
gcloud auth configure-docker ${REPOSITORY_ZONE}-docker.pkg.dev --quiet
- name "Construct the image tag"
run: |

Check failure on line 49 in .github/workflows/build-docs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-docs.yml

Invalid workflow file

You have an error in your yaml syntax on line 49
echo "IMAGE_TAG=${REPOSITORY_ZONE}-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME/$IMAGE:$GITHUB_RUN_ID" >> $GITHUB_ENV
# Note: we don't use GITHUB_SHA in the tag, as we have
# potentially three different relevant commits.
- name: Docker build
run: |-
docker build \
--tag $IMAGE_TAG \
-f nodatime.org/build/Dockerfile \
.
# Push the Docker image to Google Artifact Registry
- name: Publish
run: |-
docker push $IMAGE_TAG
# Get the GKE credentials so we can deploy to the cluster
- uses: google-github-actions/get-gke-credentials@db150f2cc60d1716e61922b832eae71d2a45938f
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
credentials: ${{ secrets.GKE_SA_KEY }}
# TODO: Update the (test) deployment