Document Airbyte repository capabilities and development workflow #112714
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Global Format Check | |
# This workflow checks the formatting of the codebase using pre-commit hooks. | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
format-check: | |
name: "Format Check" | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
- name: Setup Java | |
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1 | |
with: | |
distribution: "zulu" | |
java-version: "21" | |
- name: Setup Python | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
check-latest: true | |
update-environment: true | |
- name: Run Pre-Commit | |
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
id: format-check | |
with: | |
extra_args: --all-files | |
- name: Match GitHub User to Slack User [MASTER] | |
if: > | |
always() && steps.format-check.outcome == 'failure' && | |
github.ref == 'refs/heads/master' && | |
github.event.pull_request.head.repo.fork == false | |
id: match-github-to-slack-user | |
uses: ./.github/actions/match-github-to-slack-user | |
env: | |
AIRBYTE_TEAM_BOT_SLACK_TOKEN: ${{ secrets.SLACK_AIRBYTE_TEAM_READ_USERS }} | |
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Format Failure on Master Slack Channel [MASTER] | |
if: > | |
always() && steps.format-check.outcome == 'failure' && | |
github.ref == 'refs/heads/master' && | |
github.event.pull_request.head.repo.fork == false | |
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 | |
with: | |
token: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }} | |
method: chat.postMessage | |
payload: | | |
channel: C03BEADRPNY | |
text: "Formatting broken on master!" | |
blocks: | |
- type: divider | |
- type: section | |
text: | |
type: mrkdwn | |
text: "Formatting is broken on master! :bangbang: \n\n" | |
- type: section | |
text: | |
type: mrkdwn | |
text: "_merged by_: *${{ github.actor }}* \n" | |
- type: section | |
text: | |
type: mrkdwn | |
text: "<@${{ steps.match-github-to-slack-user.outputs.slack_user_ids }}> \n" | |
- type: section | |
text: | |
type: mrkdwn | |
text: " :octavia-shocked: <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|View Action Run> :octavia-shocked: \n" | |
- type: divider |