diff --git a/.github/workflows/build-api.yaml b/.github/workflows/build-api.yaml new file mode 100644 index 00000000..1bdd9679 --- /dev/null +++ b/.github/workflows/build-api.yaml @@ -0,0 +1,32 @@ +on: + push: + branches: + - main + 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: github-actions@integrationos.iam.gserviceaccount.com + workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions + build-args: | + "EXECUTABLE=api" diff --git a/.github/workflows/build-event-core.yaml b/.github/workflows/build-event-core.yaml new file mode 100644 index 00000000..a0328e5b --- /dev/null +++ b/.github/workflows/build-event-core.yaml @@ -0,0 +1,34 @@ +on: + push: + branches: + - main + 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: github-actions@integrationos.iam.gserviceaccount.com + workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions + build-args: | + "EXECUTABLE=event-core" diff --git a/.github/workflows/build-gateway.yaml b/.github/workflows/build-gateway.yaml new file mode 100644 index 00000000..418ce8c0 --- /dev/null +++ b/.github/workflows/build-gateway.yaml @@ -0,0 +1,33 @@ +on: + push: + branches: + - main + 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: github-actions@integrationos.iam.gserviceaccount.com + workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions + build-args: | + "EXECUTABLE=gateway" diff --git a/.github/workflows/build-watchdog.yaml b/.github/workflows/build-watchdog.yaml new file mode 100644 index 00000000..695873fa --- /dev/null +++ b/.github/workflows/build-watchdog.yaml @@ -0,0 +1,33 @@ +on: + push: + branches: + - main + 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: github-actions@integrationos.iam.gserviceaccount.com + workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions + build-args: | + "EXECUTABLE=watchdog"