Generate Docker image for GCP compute #18
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-memgraph -f dockerfile.memgraph . &&\ | |
docker tag generate-wiki-memgraph europe-west9-docker.pkg.dev/sixdegreesofwikiadventure/wiki-graph/generate-wiki-memgraph &&\ | |
docker tag generate-wiki-memgraph sacramentix1225/generate-wiki-memgraph &&\ | |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} &&\ | |
docker push sacramentix1225/generate-wiki-memgraph &&\ | |
gcloud auth configure-docker europe-west9-docker.pkg.dev --quiet &&\ | |
docker push europe-west9-docker.pkg.dev/sixdegreesofwikiadventure/wiki-graph/generate-wiki-memgraph | |