diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml deleted file mode 100644 index 47f7100727..0000000000 --- a/.github/workflows/auto-approve.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Auto Approve DependaBot PRs - -on: - pull_request: - branches: - - master - -permissions: - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v1.1.1 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - - name: Approve a PR - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml deleted file mode 100644 index 98d59e3f21..0000000000 --- a/.github/workflows/auto-merge-dependabot.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Auto Merge Dependabot PRs -on: - pull_request: - branches: - - master - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - name: Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@v1.1.1 - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' - - name: Enable auto-merge for Dependabot PRs - if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/jira-issue-label-added.yaml b/.github/workflows/jira-issue-label-added.yaml deleted file mode 100644 index c3f8cd7be1..0000000000 --- a/.github/workflows/jira-issue-label-added.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: Jira Issue Label Added - -on: - issues: - types: - - labeled - -jobs: - call-workflow: - uses: stoplightio/.github/.github/workflows/jira-issue-label-added.yaml@master - with: - team-name: ${{ contains(github.event.pull_request.labels.*.name, 'team/bad-news-bears') && 'Bad News Bears' || contains(github.event.pull_request.labels.*.name, 'team/maintenance') && 'Maintenance' || '' }} - secrets: inherit diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml deleted file mode 100644 index dd6f03ac7b..0000000000 --- a/.github/workflows/markdown-links.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Check Markdown Links - -on: - pull_request: - branches: - - master - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - with: - fetch-depth: 1 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000000..9ebd17358e --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,56 @@ +name: Image Build on Merge + +on: + push: + branches: + - 'main' + +env: + REGISTRY_PROJECT: datawireio/blackbird/spectra + REGISTRY_REGION: us-central1-docker.pkg.dev + +jobs: + build-and-push: + permissions: + contents: 'read' + id-token: 'write' + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Git Config + shell: bash + run: | + set -x + git config --global user.email '${{ secrets.GH_AUTO_EMAIL }}' + git config --global user.name '${{ secrets.GH_AUTO_USER }}' + + - name: Docker Login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@v2 + with: + workload_identity_provider: 'projects/863968914497/locations/global/workloadIdentityPools/github-pool/providers/github' + service_account: 'github@datawireio.iam.gserviceaccount.com' + + - name: Setup Google Cloud SDK + uses : google-github-actions/setup-gcloud@v1 + + - name: Authenticate docker to gcloud + run: | + gcloud auth configure-docker ${{ env.REGISTRY_REGION }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v4 + with: + push: true + context: . + file: Dockerfile + platforms: linux/amd64 + tags: | + ${{ env.REGISTRY_REGION }}/${{ env.REGISTRY_PROJECT }}:latest diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml deleted file mode 100644 index 7d32b890d8..0000000000 --- a/.github/workflows/pr-title.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 'PR title uses semantic release format' - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -permissions: - pull-requests: read - -jobs: - main: - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 350825cbde..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Release -on: - push: - branches: - - master - -permissions: - contents: write - pull-requests: write - -jobs: - # Create release PR - release-please: - name: Release Please - runs-on: ubuntu-latest - if: github.repository == 'stoplightio/prism' - outputs: - release_created: ${{ steps.release.outputs.release_created }} - tag_name: ${{ steps.release.outputs.tag_name }} - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: google-github-actions/release-please-action@v4 - id: release - with: - token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }} - target-branch: master