Generate Docker image for GCP compute #5
This file contains 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: Generate Docker image for GCP compute | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_JSON_NON_ESCAPED }}' | |
- name: Docker Setup Buildx | |
uses: docker/[email protected] | |
- name: Set up gcloud Cloud SDK environment | |
uses: google-github-actions/[email protected] | |
- name: Create a Google Compute Engine instance to do the work | |
run: | | |
docker build -t generate-wiki-graph . &&\ | |
docker tag generate-wiki-graph europe-west9-docker.pkg.dev/sixdegreesofwikiadventure/wiki-graph/generate-wiki-graph &&\ | |
docker tag generate-wiki-graph sacramentix1225/generate-wiki-graph &&\ | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} &&\ | |
docker push sacramentix1225/generate-wiki-graph &&\ | |
gcloud auth configure-docker europe-west9-docker.pkg.dev --quiet &&\ | |
docker push europe-west9-docker.pkg.dev/sixdegreesofwikiadventure/wiki-graph/generate-wiki-graph | |