-
Notifications
You must be signed in to change notification settings - Fork 161
chore: fork CI #4051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: fork CI #4051
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,6 +8,10 @@ on: | |||||
| default: false | ||||||
| required: false | ||||||
| type: boolean | ||||||
| untrusted_source: | ||||||
| description: Whether the source is untrusted (e.g. running from a fork) | ||||||
| required: true | ||||||
| type: boolean | ||||||
| outputs: | ||||||
| container-image-name: | ||||||
| description: Container image name | ||||||
|
|
@@ -92,7 +96,7 @@ jobs: | |||||
| tags: ${{ steps.meta.outputs.tags }} | ||||||
| labels: ${{ steps.meta.outputs.labels }} | ||||||
| push: ${{ inputs.publish }} | ||||||
| save: true | ||||||
| save: ${{ not inputs.untrusted_source }} | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid expression syntax – use GitHub Actions expressions use 🐛 Proposed fix- save: ${{ not inputs.untrusted_source }}
+ save: ${{ ! inputs.untrusted_source }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.11)[error] 99-99: parser did not reach end of input after parsing the expression. 3 remaining token(s) in the input: "IDENT", ".", "IDENT" (expression) 🤖 Prompt for AI Agents |
||||||
| project: ${{ vars.DEPOT_PROJECT }} | ||||||
|
|
||||||
| - name: Set image ref | ||||||
|
|
@@ -104,6 +108,7 @@ jobs: | |||||
|
|
||||||
| - name: Retrieve pull token | ||||||
| id: pull-token | ||||||
| if: not inputs.untrusted_source | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Two issues here: 🐛 Proposed fix- if: not inputs.untrusted_source
+ if: ${{ ! inputs.untrusted_source }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.11)[error] 111-111: parser did not reach end of input after parsing the expression. 3 remaining token(s) in the input: "IDENT", ".", "IDENT" (expression) 🤖 Prompt for AI Agents |
||||||
| run: | | ||||||
| PULL_TOKEN="$(depot pull-token --project ${VARS_DEPOT_PROJECT})" | ||||||
| echo "token=$PULL_TOKEN" >> "$GITHUB_OUTPUT" | ||||||
|
|
@@ -199,7 +204,7 @@ jobs: | |||||
| tags: ${{ steps.meta.outputs.tags }} | ||||||
| labels: ${{ steps.meta.outputs.labels }} | ||||||
| push: ${{ inputs.publish }} | ||||||
| save: true | ||||||
| save: ${{ not inputs.untrusted_source }} | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same syntax fix needed here. 🐛 Proposed fix- save: ${{ not inputs.untrusted_source }}
+ save: ${{ ! inputs.untrusted_source }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.11)[error] 207-207: parser did not reach end of input after parsing the expression. 3 remaining token(s) in the input: "IDENT", ".", "IDENT" (expression) 🤖 Prompt for AI Agents |
||||||
| project: ${{ vars.DEPOT_PROJECT }} | ||||||
|
|
||||||
| - name: Set image ref | ||||||
|
|
@@ -211,6 +216,7 @@ jobs: | |||||
|
|
||||||
| - name: Retrieve pull token | ||||||
| id: pull-token | ||||||
| if: not inputs.untrusted_source | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same syntax fix needed here. 🐛 Proposed fix- if: not inputs.untrusted_source
+ if: ${{ ! inputs.untrusted_source }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.11)[error] 219-219: parser did not reach end of input after parsing the expression. 3 remaining token(s) in the input: "IDENT", ".", "IDENT" (expression) 🤖 Prompt for AI Agents |
||||||
| run: | | ||||||
| PULL_TOKEN="$(depot pull-token --project ${VARS_DEPOT_PROJECT})" | ||||||
| echo "token=$PULL_TOKEN" >> "$GITHUB_OUTPUT" | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -370,6 +370,8 @@ jobs: | |||||||||
| uses: ./.github/workflows/artifacts.yaml | ||||||||||
| with: | ||||||||||
| publish: ${{ github.event_name == 'push' }} | ||||||||||
| # detect if the source is a fork | ||||||||||
| untrusted_source: ${{ github.event.pull_request.head.repo.full_name != github.repository }} | ||||||||||
|
Comment on lines
+373
to
+374
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Push events will be incorrectly marked as untrusted. On This likely isn't intended – pushes to main should be trusted. Consider handling the push case explicitly: 🛠️ Suggested fix # detect if the source is a fork
- untrusted_source: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
+ untrusted_source: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| packages: write | ||||||||||
|
|
@@ -420,6 +422,7 @@ jobs: | |||||||||
| persist-credentials: false | ||||||||||
|
|
||||||||||
| - name: Create override files for quickstart | ||||||||||
| if: github.event.pull_request.head.repo.full_name == github.repository | ||||||||||
| env: | ||||||||||
| DEPOT_IMAGE_URL: ${{ needs.artifacts.outputs.container-image-url-depot }} | ||||||||||
| run: | | ||||||||||
|
|
@@ -441,6 +444,24 @@ jobs: | |||||||||
|
|
||||||||||
| cat quickstart/docker-compose.override.yaml | ||||||||||
|
|
||||||||||
| - name: Build as part of quickstart | ||||||||||
| if: github.event.pull_request.head.repo.full_name != github.repository | ||||||||||
| run: | | ||||||||||
| cat > quickstart/docker-compose.override.yaml <<EOF | ||||||||||
| services: | ||||||||||
| openmeter: | ||||||||||
| build: .. | ||||||||||
| sink-worker: | ||||||||||
| build: .. | ||||||||||
| balance-worker: | ||||||||||
| build: .. | ||||||||||
| notification-service: | ||||||||||
| build: .. | ||||||||||
| billing-worker: | ||||||||||
| build: .. | ||||||||||
| openmeter-jobs: | ||||||||||
| build: .. | ||||||||||
| EOF | ||||||||||
| - name: Launch Docker Compose | ||||||||||
| run: docker compose -f docker-compose.yaml -f docker-compose.override.yaml up -d | ||||||||||
| working-directory: quickstart | ||||||||||
|
|
@@ -512,6 +533,7 @@ jobs: | |||||||||
| - name: Create override files for e2e | ||||||||||
| env: | ||||||||||
| DEPOT_IMAGE_URL: ${{ needs.artifacts.outputs.container-image-url-depot }} | ||||||||||
| if: github.event.pull_request.head.repo.full_name == github.repository | ||||||||||
| run: | | ||||||||||
| cat > e2e/docker-compose.override.yaml <<EOF | ||||||||||
| services: | ||||||||||
|
|
@@ -523,6 +545,19 @@ jobs: | |||||||||
|
|
||||||||||
| cat e2e/docker-compose.override.yaml | ||||||||||
|
|
||||||||||
| - name: Build as part of e2e | ||||||||||
| if: github.event.pull_request.head.repo.full_name != github.repository | ||||||||||
| run: | | ||||||||||
| cat > e2e/docker-compose.override.yaml <<EOF | ||||||||||
| services: | ||||||||||
| openmeter: | ||||||||||
| build: .. | ||||||||||
| sink-worker: | ||||||||||
| build: .. | ||||||||||
| EOF | ||||||||||
|
|
||||||||||
| cat e2e/docker-compose.override.yaml | ||||||||||
|
|
||||||||||
| - name: Launch Docker Compose infra | ||||||||||
| run: docker compose -f docker-compose.infra.yaml -f docker-compose.openmeter.yaml -f docker-compose.override.yaml up -d | ||||||||||
| working-directory: e2e | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: openmeterio/openmeter
Length of output: 1185
Update all workflow callers or make
untrusted_sourceoptional.The
release.yamlworkflow callsartifacts.yamlbut doesn't pass the newuntrusted_sourceinput. Since it's marked asrequired: true, this will break therelease.yamlworkflow. Either make it optional with a default value, or updaterelease.yaml(and any other callers) to pass it.🤖 Prompt for AI Agents