-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into source-amazon-seller-partner-delete-deprec…
…ated-streams
- Loading branch information
Showing
160 changed files
with
3,594 additions
and
2,407 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: "Get airbyte-ci runner name" | ||
description: "Runs a given airbyte-ci command with the --ci-requirements flag to get the CI requirements for a given command" | ||
inputs: | ||
runner_type: | ||
description: "Type of runner to get requirements for. One of: format, test, nightly, publish" | ||
required: true | ||
runner_size: | ||
description: "One of: format, test, nightly, publish" | ||
required: true | ||
airbyte_ci_command: | ||
description: "airbyte-ci command to get CI requirements for." | ||
required: true | ||
runner_name_prefix: | ||
description: "Prefix of runner name" | ||
required: false | ||
default: ci-runner-connector | ||
github_token: | ||
description: "GitHub token" | ||
required: true | ||
sentry_dsn: | ||
description: "Sentry DSN" | ||
required: false | ||
airbyte_ci_binary_url: | ||
description: "URL to airbyte-ci binary" | ||
required: false | ||
default: https://connectors.airbyte.com/airbyte-ci/releases/ubuntu/latest/airbyte-ci | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Check if PR is from a fork | ||
if: github.event_name == 'pull_request' | ||
shell: bash | ||
run: | | ||
if [ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]; then | ||
echo "PR is from a fork. Exiting workflow..." | ||
exit 78 | ||
fi | ||
- name: Get changed files | ||
uses: tj-actions/changed-files@v39 | ||
id: changes | ||
with: | ||
files_yaml: | | ||
pipelines: | ||
- 'airbyte-ci/connectors/pipelines/**' | ||
- name: Determine how Airbyte CI should be installed | ||
shell: bash | ||
id: determine-install-mode | ||
run: | | ||
if [[ "${{ github.ref }}" != "refs/heads/master" ]] && [[ "${{ steps.changes.outputs.pipelines_any_changed }}" == "true" ]]; then | ||
echo "Making changes to Airbyte CI on a non-master branch. Airbyte-CI will be installed from source." | ||
echo "install-mode=dev" >> $GITHUB_OUTPUT | ||
else | ||
echo "install-mode=production" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Install airbyte-ci binary | ||
id: install-airbyte-ci | ||
if: steps.determine-install-mode.outputs.install-mode == 'production' | ||
shell: bash | ||
run: | | ||
curl -sSL ${{ inputs.airbyte_ci_binary_url }} --output airbyte-ci-bin | ||
sudo mv airbyte-ci-bin /usr/local/bin/airbyte-ci | ||
sudo chmod +x /usr/local/bin/airbyte-ci | ||
- name: Install Python 3.10 | ||
uses: actions/setup-python@v4 | ||
if: steps.determine-install-mode.outputs.install-mode == 'dev' | ||
with: | ||
python-version: "3.10" | ||
token: ${{ inputs.github_token }} | ||
|
||
- name: Install ci-connector-ops package | ||
if: steps.determine-install-mode.outputs.install-mode == 'dev' | ||
shell: bash | ||
run: | | ||
pip install pipx | ||
pipx ensurepath | ||
pipx install airbyte-ci/connectors/pipelines/ | ||
- name: Get dagger version from airbyte-ci | ||
id: get-dagger-version | ||
shell: bash | ||
run: | | ||
dagger_version=$(airbyte-ci ${{ inputs.airbyte_ci_command }} --ci-requirements | tail -n 1 | jq -r '.dagger_version') | ||
echo "dagger_version=${dagger_version}" >> "$GITHUB_OUTPUT" | ||
- name: Get runner name | ||
id: get-runner-name | ||
shell: bash | ||
run: | | ||
runner_name_prefix=${{ inputs.runner_name_prefix }} | ||
runner_type=${{ inputs.runner_type }} | ||
runner_size=${{ inputs.runner_size }} | ||
dashed_dagger_version=$(echo "${{ steps.get-dagger-version.outputs.dagger_version }}" | tr '.' '-') | ||
runner_name="${runner_name_prefix}-${runner_type}-${runner_size}-dagger-${dashed_dagger_version}" | ||
echo ${runner_name} | ||
echo "runner_name=${runner_name}" >> "$GITHUB_OUTPUT" | ||
outputs: | ||
runner_name: | ||
description: "Name of self hosted CI runner to use" | ||
value: ${{ steps.get-runner-name.outputs.runner_name }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.