Skip to content

Commit

Permalink
Add GitHub Actions workflows to build and push Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkuczera committed Apr 5, 2024
1 parent b116036 commit 67ddd24
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- main
- github-actions-build-workflows
tags:
- "[0-9]+.[0-9]+.[0-9]+"
paths:
- .github/workflows/build-api.yaml
- "api/**"
- Dockerfile
- Cargo.lock

env:
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: integration-os/google-artifact-registry-action@v2
with:
image: "us-docker.pkg.dev/integrationos/docker-oss/api:${{ env.docker_image_tag }}"
service_account: [email protected]
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
build-args: |
"EXECUTABLE=api"
35 changes: 35 additions & 0 deletions .github/workflows/build-event-core.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches:
- main
- github-actions-build-workflows
tags:
- "[0-9]+.[0-9]+.[0-9]+"
paths:
- .github/workflows/build-event-core.yaml
- "event-core/**"
- "google-token-fetcher/**"
- "redis-retry/**"
- Dockerfile
- Cargo.lock

env:
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: integration-os/google-artifact-registry-action@v2
with:
image: "us-docker.pkg.dev/integrationos/docker-oss/event-core:${{ env.docker_image_tag }}"
service_account: [email protected]
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
build-args: |
"EXECUTABLE=event-core"
34 changes: 34 additions & 0 deletions .github/workflows/build-gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches:
- main
- github-actions-build-workflows
tags:
- "[0-9]+.[0-9]+.[0-9]+"
paths:
- .github/workflows/build-gateway.yaml
- "gateway/**"
- "redis-retry/**"
- Dockerfile
- Cargo.lock

env:
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: integration-os/google-artifact-registry-action@v2
with:
image: "us-docker.pkg.dev/integrationos/docker-oss/gateway:${{ env.docker_image_tag }}"
service_account: [email protected]
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
build-args: |
"EXECUTABLE=gateway"
34 changes: 34 additions & 0 deletions .github/workflows/build-watchdog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches:
- main
- github-actions-build-workflows
tags:
- "[0-9]+.[0-9]+.[0-9]+"
paths:
- .github/workflows/build-watchdog.yaml
- "watchdog/**"
- "redis-retry/**"
- Dockerfile
- Cargo.lock

env:
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: integration-os/google-artifact-registry-action@v2
with:
image: "us-docker.pkg.dev/integrationos/docker-oss/watchdog:${{ env.docker_image_tag }}"
service_account: [email protected]
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
build-args: |
"EXECUTABLE=watchdog"

0 comments on commit 67ddd24

Please sign in to comment.