diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..8105e34 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,27 @@ +name: Build + +on: + push: + branches: + - main + tags: + - "[0-9]+.[0-9]+.[0-9]+" + +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/oauth:${{ 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 diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml deleted file mode 100644 index b942b89..0000000 --- a/.github/workflows/deployment.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Deployment -on: - push: - branches: - - main - tags: - - "[0-9]+.[0-9]+.[0-9]+" - -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@v1 - with: - image: "us-east4-docker.pkg.dev/buildable-production/event-docker/oauth:${{ env.docker_image_tag }}" - build-args: "CARGO_REGISTRIES_CLOUDSMITH_TOKEN=${{ secrets.CLOUDSMITH_API_KEY }}" - - deploy: - if: ${{ github.ref == 'refs/heads/main' }} - needs: build - runs-on: ubuntu-latest - - steps: - - uses: integration-os/development-environment-deploy-action@v1 - with: - ssh_key: ${{ secrets.INFRASTRUCTURE_DEPLOY_KEY }} - service_name: oauth-api - yaml_path: .event.services.oauthApi.image.tag - docker_image_tag: ${{ env.docker_image_tag }}