Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions .github/workflows/connectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- 'airbyte-to-flow/**'
airbyte_to_flow:
runs-on: ubuntu-24.04

if: needs.paths-filter.outputs.atf_modified == 'true'
permissions:
contents: read
packages: write
Expand All @@ -33,29 +33,25 @@ jobs:

steps:
- uses: actions/checkout@v2
if: needs.paths-filter.outputs.atf_modified == 'true'
with:
fetch-depth: 0

- name: Prepare
id: prep
if: needs.paths-filter.outputs.atf_modified == 'true'
run: |
TAG=$(echo $GITHUB_SHA | head -c7)
echo ::set-output name=tag::${TAG}

# Linux builds need the non-default musl target.
- name: Install Rust
uses: actions-rs/toolchain@v1
if: needs.paths-filter.outputs.atf_modified == 'true'
with:
toolchain: stable
target: x86_64-unknown-linux-musl
default: true
override: true

- uses: actions/cache@v3
if: needs.paths-filter.outputs.atf_modified == 'true'
with:
path: |
~/.cargo/bin/
Expand All @@ -66,27 +62,22 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install protobuf compiler (it's not already included in CI runner)
if: needs.paths-filter.outputs.atf_modified == 'true'
run: sudo apt install -y libprotobuf-dev protobuf-compiler

- name: Build Linux
if: needs.paths-filter.outputs.atf_modified == 'true'
run: |-
sudo apt-get update && \
sudo apt-get install -y musl-tools && \
cd airbyte-to-flow && \
make

- name: Tests
if: needs.paths-filter.outputs.atf_modified == 'true'
run: cd airbyte-to-flow && cargo test --release --target x86_64-unknown-linux-musl

- name: Set up Docker Buildx
if: needs.paths-filter.outputs.atf_modified == 'true'
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
if: needs.paths-filter.outputs.atf_modified == 'true'
uses: docker/login-action@v2
with:
registry: ghcr.io
Expand All @@ -95,7 +86,7 @@ jobs:

- name: Build and push (dev and commit tag)
uses: docker/build-push-action@v3
if: needs.paths-filter.outputs.atf_modified == 'true' && github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master'
with:
context: airbyte-to-flow
platforms: linux/amd64
Expand All @@ -104,7 +95,7 @@ jobs:

- name: Build and push (commit tag)
uses: docker/build-push-action@v3
if: needs.paths-filter.outputs.atf_modified == 'true' && github.ref != 'refs/heads/master'
if: github.ref != 'refs/heads/master'
with:
context: airbyte-to-flow
platforms: linux/amd64
Expand Down