Skip to content

Commit

Permalink
Merge pull request #16 from Fgruntjes/revert-15-initial-build
Browse files Browse the repository at this point in the history
Revert "deploy test"
  • Loading branch information
Fgruntjes authored Sep 29, 2022
2 parents c26cb7d + 86d1d7a commit fa20d5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
name: Deploy
on:
pull_request:
push:
branches:
- 'main'
- 'beta'
tags:
- '*'

jobs:
build_images:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '6.0.x' ]
project: [ 'App.Function.Banktransaction.Import' ]
steps:
- uses: actions/checkout@v2
- uses: crazy-max/ghaction-docker-meta@v4
id: docker_meta
with:
images: ghcr.io/${{ github.repository }}/${{ matrix.project }}
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
- uses: docker/setup-buildx-action@v1.6.0
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/[email protected]
with:
context: .
file: '${{ matrix.project }}/Dockerfile'
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
cache-from: type=gha
Expand All @@ -45,27 +43,17 @@ jobs:
matrix:
project: [ 'App.Function.Banktransaction.Import' ]
environment: [ 'beta' ]
region: [ 'europe-central2' ]
steps:
- run: 'echo ${{ github.ref }}'
- uses: 'actions/checkout@v3'
- uses: 'google-github-actions/auth@v0'
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- uses: crazy-max/ghaction-docker-meta@v4
id: docker_meta
- id: 'deploy'
uses: 'google-github-actions/deploy-cloudrun@v0'
with:
images: ghcr.io/${{ github.repository }}/${{ matrix.project }}
- uses: mshick/fast-envsubst@v1
env:
DEPLOY_ENV: ${{ matrix.environment }}
IMAGE: ${{ steps.docker_meta.outputs.tags }}
with:
in-file: ${{ matrix.project }}/service.yaml
out-file: ${{ matrix.project }}/service.deploy.yaml
- run: cat ${{ matrix.project }}/service.deploy.yaml
- uses: 'google-github-actions/deploy-cloudrun@v0'
with:
metadata: '${{ matrix.project }}/service.deploy.yaml'
region: ${{ matrix.region }}
metadata: '${{ matrix.project }}'
env_vars: 'DEPLOY_ENV=${{ matrix.environment }}'
4 changes: 2 additions & 2 deletions App.Function.Banktransaction.Import/service.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: import.${DEPLOY_ENV}
name: ${DEPLOY_ENV}.import
spec:
template:
spec:
containerConcurrency: 1
containers:
- image: ${IMAGE}
- image: ${IMAGE_TAG}
resources:
limits:
cpu: "1"
Expand Down

0 comments on commit fa20d5a

Please sign in to comment.