Skip to content

change: nest cards and cookies under user response upon login (#40) #39

change: nest cards and cookies under user response upon login (#40)

change: nest cards and cookies under user response upon login (#40) #39

Workflow file for this run

name: release
on:
push:
branches:
- main
env:
IMAGE_NAME: eu.gcr.io/rejsekort/rejsekort-python
jobs:
deploy:
# Add "id-token" with the intended permissions.
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate with Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_POOL_PROVIDER }}
service_account: ${{ secrets.REJSEKORT_SERVICE_ACCOUNT_EMAIL }}
# Setup gcloud CLI
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- name: GCloud Docker Auth
run: |-
gcloud --quiet auth configure-docker
# - name: Get Version Tag
# id: get_release_tag
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build an image from Dockerfile
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ github.sha }}
${{ env.IMAGE_NAME }}:latest
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: rejsekort
region: europe-west1
image: "${{ env.IMAGE_NAME }}:${{ github.sha }}"
env_vars: ENV=production
- name: Use output
run: curl ${{ steps.deploy.outputs.url }}