-
-
Notifications
You must be signed in to change notification settings - Fork 11
Build docker build images #122
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: um42
Are you sure you want to change the base?
Conversation
This should improve DX somewhat by providing a prebuilt environment for katsu
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| registry: ghcr.io | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| dockerfile: builder.Dockerfile | ||
| push: true | ||
| tags: ghcr.io/ultramarine-linux/katsu:latest |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, add a permissions: block either at the root of the workflow (applies to all jobs) or specifically to the docker job, assigning the minimal permissions necessary. For this workflow, the minimum is contents: read. If pushing to the GitHub Container Registry using GITHUB_TOKEN is required, adding packages: write would also be prudent, as that permission controls publishing container images. Insert this block above the jobs: key at the top level, or within the specific job definition. The best location is at the root of the workflow for clarity and because there is only one job, which keeps the file maintainable and follows best practice.
This change requires adding:
permissions:
contents: read
packages: writeafter the workflow name (line 1), or before the jobs: key (line 5).
-
Copy modified lines R5-R7
| @@ -2,6 +2,9 @@ | ||
|
|
||
| on: [push] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| jobs: | ||
| docker: | ||
| runs-on: ubuntu-latest |
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| registry: ghcr.io | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
|
Merge into 43 |
This should improve DX somewhat by providing a prebuilt environment for katsu