49 lines
1.9 KiB
YAML
49 lines
1.9 KiB
YAML
name: Fix formatting on a branch
|
|
run-name: Fix formatting on ${{ github.ref }}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
# Cancel any previous runs on the same branch if they are still in progress
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
jobs:
|
|
format-fix:
|
|
name: "Run airbyte-ci format fix all"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Airbyte
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
# Important that this is set so that CI checks are triggered again
|
|
# Without this we would be forever waiting on required checks to pass
|
|
token: ${{ secrets.GH_PAT_APPROVINGTON_OCTAVIA }}
|
|
|
|
- name: Run airbyte-ci format fix all
|
|
uses: ./.github/actions/run-airbyte-ci
|
|
continue-on-error: true
|
|
with:
|
|
context: "manual"
|
|
dagger_cloud_token: ${{ secrets.DAGGER_CLOUD_TOKEN_2 }}
|
|
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
gcs_credentials: ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }}
|
|
sentry_dsn: ${{ secrets.SENTRY_AIRBYTE_CI_DSN }}
|
|
github_token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
|
|
subcommand: "format fix all"
|
|
|
|
# This is helpful in the case that we change a previously committed generated file to be ignored by git.
|
|
- name: Remove any files that have been gitignored
|
|
run: git ls-files -i -c --exclude-from=.gitignore | xargs -r git rm --cached
|
|
|
|
- name: Commit Formatting Changes (PR)
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
# Don't commit if we're on master
|
|
if: github.ref != 'refs/heads/master'
|
|
with:
|
|
commit_message: "chore: format code"
|
|
commit_user_name: Octavia Squidington III
|
|
commit_user_email: octavia-squidington-iii@users.noreply.github.com
|