@@ -9,16 +9,16 @@ inputs:
9
9
required : true
10
10
github_token :
11
11
description : " GitHub token"
12
- required : true
12
+ required : false
13
13
dagger_cloud_token :
14
14
description : " Dagger Cloud token"
15
- required : true
15
+ required : false
16
16
docker_hub_username :
17
17
description : " Dockerhub username"
18
- required : true
18
+ required : false
19
19
docker_hub_password :
20
20
description : " Dockerhub password"
21
- required : true
21
+ required : false
22
22
options :
23
23
description : " Options for the subcommand"
24
24
required : false
@@ -93,15 +93,14 @@ runs:
93
93
- name : Get start timestamp
94
94
id : get-start-timestamp
95
95
shell : bash
96
- run : echo "name=start-timestamp=$(date +%s)" >> $GITHUB_OUTPUT
97
-
96
+ run : echo "start-timestamp=$(date +%s)" >> $GITHUB_OUTPUT
98
97
- name : Docker login
99
98
id : docker-login
100
99
uses : docker/login-action@v3
100
+ if : ${{ inputs.docker_hub_username != '' && inputs.docker_hub_password != '' }}
101
101
with :
102
102
username : ${{ inputs.docker_hub_username }}
103
103
password : ${{ inputs.docker_hub_password }}
104
-
105
104
- name : Install Airbyte CI
106
105
id : install-airbyte-ci
107
106
uses : ./.github/actions/install-airbyte-ci
@@ -111,19 +110,19 @@ runs:
111
110
- name : Run airbyte-ci
112
111
id : run-airbyte-ci
113
112
shell : bash
114
- run : |
115
- airbyte-ci --disable-update-check --disable-dagger-run --is-ci --gha-workflow-run-id=${{ github.run_id }} ${{ inputs.subcommand }} ${{ inputs.options }}
116
113
env :
114
+ CI : " True"
115
+ CI_GIT_USER : ${{ github.repository_owner }}
116
+ CI_PIPELINE_START_TIMESTAMP : ${{ steps.get-start-timestamp.outputs.start-timestamp }}
117
+ PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }}
118
+ # Next environment variables are workflow inputs based and can be set with empty values if the inputs are not required and passed
117
119
CI_CONTEXT : " ${{ inputs.context }}"
118
- CI_GIT_REPO_URL : ${{ inputs.git_repo_url }}
119
120
CI_GIT_BRANCH : ${{ inputs.git_branch || github.head_ref }}
121
+ CI_GIT_REPO_URL : ${{ inputs.git_repo_url }}
120
122
CI_GIT_REVISION : ${{ inputs.git_revision || github.sha }}
121
- CI_GIT_USER : ${{ github.repository_owner }}
122
123
CI_GITHUB_ACCESS_TOKEN : ${{ inputs.github_token }}
123
124
CI_JOB_KEY : ${{ inputs.ci_job_key }}
124
- CI_PIPELINE_START_TIMESTAMP : ${{ steps.get-start-timestamp.outputs.start-timestamp }}
125
125
CI_REPORT_BUCKET_NAME : ${{ inputs.report_bucket_name }}
126
- CI : " True"
127
126
DAGGER_CLOUD_TOKEN : " ${{ inputs.dagger_cloud_token }}"
128
127
DOCKER_HUB_PASSWORD : ${{ inputs.docker_hub_password }}
129
128
DOCKER_HUB_USERNAME : ${{ inputs.docker_hub_username }}
@@ -133,47 +132,46 @@ runs:
133
132
METADATA_SERVICE_BUCKET_NAME : ${{ inputs.metadata_service_bucket_name }}
134
133
METADATA_SERVICE_GCS_CREDENTIALS : ${{ inputs.metadata_service_gcs_credentials }}
135
134
PRODUCTION : ${{ inputs.production }}
136
- PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }}
137
135
PYTHON_REGISTRY_TOKEN : ${{ inputs.python_registry_token }}
138
136
PYTHON_REGISTRY_URL : ${{ inputs.python_registry_url }}
139
- PYTHON_REGISTRY_CHECK_URL : ${{ inputs.python_registry_check_url }}
140
137
S3_BUILD_CACHE_ACCESS_KEY_ID : ${{ inputs.s3_build_cache_access_key_id }}
141
138
S3_BUILD_CACHE_SECRET_KEY : ${{ inputs.s3_build_cache_secret_key }}
142
139
SENTRY_DSN : ${{ inputs.sentry_dsn }}
143
- SENTRY_ENVIRONMENT : ${{ steps.determine-install-mode.outputs.install-mode }}
144
140
SLACK_WEBHOOK : ${{ inputs.slack_webhook_url }}
145
141
SPEC_CACHE_BUCKET_NAME : ${{ inputs.spec_cache_bucket_name }}
146
142
SPEC_CACHE_GCS_CREDENTIALS : ${{ inputs.spec_cache_gcs_credentials }}
147
- # give the Dagger Engine more time to push cache data to Dagger Cloud
143
+ run : |
144
+ airbyte-ci --disable-update-check --disable-dagger-run --is-ci --gha-workflow-run-id=${{ github.run_id }} ${{ inputs.subcommand }} ${{ inputs.options }}
148
145
- name : Stop Engine
149
146
id : stop-engine
150
147
if : always()
151
148
shell : bash
152
149
run : |
153
150
mapfile -t containers < <(docker ps --filter name="dagger-engine-*" -q)
154
151
if [[ "${#containers[@]}" -gt 0 ]]; then
152
+ # give 5mn to the Dagger Engine to push cache data to Dagger Cloud
155
153
docker stop -t 300 "${containers[@]}";
156
154
fi
157
155
158
- - name : Collect docker logs on failure
159
- id : collect-docker -logs
156
+ - name : Collect dagger engine logs
157
+ id : collect-dagger-engine -logs
160
158
if : always()
161
159
uses : jwalton/gh-docker-logs@v2
162
160
with :
163
- dest : " ./docker_logs "
161
+ dest : " ./dagger_engine_logs "
164
162
images : " registry.dagger.io/engine"
165
163
166
164
- name : Tar logs
167
165
id : tar-logs
168
166
if : always()
169
167
shell : bash
170
- run : tar cvzf ./docker_logs .tgz ./docker_logs
168
+ run : tar cvzf ./dagger_engine_logs .tgz ./dagger_engine_logs
171
169
172
170
- name : Upload logs to GitHub
173
- id : upload-docker -logs
171
+ id : upload-dagger-engine -logs
174
172
if : always()
175
173
uses : actions/upload-artifact@v4
176
174
with :
177
- name : docker_logs .tgz
178
- path : ./docker_logs .tgz
175
+ name : dagger_engine_logs .tgz
176
+ path : ./dagger_engine_logs .tgz
179
177
retention-days : 7
0 commit comments