Skip to content

ci: run docker builds from PRs#8

Closed
potyl wants to merge 2 commits intomainfrom
emo/ci-pr-docker-build
Closed

ci: run docker builds from PRs#8
potyl wants to merge 2 commits intomainfrom
emo/ci-pr-docker-build

Conversation

@potyl
Copy link
Contributor

@potyl potyl commented Sep 29, 2025

ci: run docker builds from PRs

This way we can test if we break the build process from a PR.

ci: docker build is now done with a shared workflow

This will allow us to run the workflow in PRs.

This will allow us to run the workflow in PRs.
This way we can test if we break the build process from a PR.
@potyl potyl self-assigned this Sep 29, 2025
Comment on lines +17 to +21
name: Docker Build
uses: ./.github/workflows/docker-build.yaml
secrets: inherit
with:
push: false

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 4 months ago

To fix this problem, we should introduce a permissions block that explicitly scopes the GITHUB_TOKEN permissions to the minimum needed for the job(s). Since we don't see any evidence from this code alone that write permissions or extra scopes are required, the best default is contents: read, which is commonly the safest minimum. You can add the permissions: key to the root (top-level) of the workflow so that it applies to all jobs unless overridden, or to the individual job(s); the simplest approach is at the top level, beneath name: and above on:. This change only involves inserting a few lines at the top of .github/workflows/pull-request.yaml.

Suggested changeset 1
.github/workflows/pull-request.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml
--- a/.github/workflows/pull-request.yaml
+++ b/.github/workflows/pull-request.yaml
@@ -1,4 +1,6 @@
 name: Pull Request
+permissions:
+  contents: read
 
 on:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: Pull Request
permissions:
contents: read

on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
@potyl
Copy link
Contributor Author

potyl commented Sep 30, 2025

This is a public repo and they don't have access to our runners.

@potyl potyl closed this Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant