Merge pull request #5456 from openstates/upgrade-os-core-6.24.4 #176
This file contains hidden or 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: Build and push California Docker image | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
paths: | |
- "pyproject.toml" | |
- "poetry.lock" | |
- "Dockerfile.california" | |
- "scrapers/ca/*" | |
- "scrapers_next/ca/*" | |
- ".github/workflows/ca-docker.yml" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: build california docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile.california | |
tags: "openstates/scrapers-california:latest,openstates/scrapers-california:${{ github.sha }}" | |
push: true | |
publish-plural: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Authenticate with Google Cloud | |
uses: google-github-actions/auth@v2 | |
with: | |
project_id: civic-eagle-enview-prod | |
credentials_json: "${{ secrets.PLURAL_OPEN_REPO_PUSHER_KEY }}" | |
- name: Setup Google Cloud SDK | |
uses: "google-github-actions/setup-gcloud@v2" | |
- name: Docker Auth | |
run: |- | |
gcloud auth configure-docker us-central1-docker.pkg.dev --quiet | |
- name: Build and Push docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: Dockerfile.california | |
tags: "us-central1-docker.pkg.dev/civic-eagle-enview-prod/open-containers/scrapers-california:latest,us-central1-docker.pkg.dev/civic-eagle-enview-prod/open-containers/scrapers-california:${{ github.sha }}" | |
push: true |