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
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
Comment on lines +8 to +11
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with other workflows in this repo and to reduce risk/noise, add an explicit minimal permissions: block (e.g. contents: read) and gate the job with if: github.repository == 'github/docs-internal' || github.repository == 'github/docs' so forks don’t run this workflow by default.

Suggested change
jobs:
build:
permissions:
contents: read
jobs:
build:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'

Copilot uses AI. Check for mistakes.

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow uses actions/checkout@v4, but this repo’s workflows generally pin actions/checkout to a specific commit SHA (e.g. 8e8c483... # v6.0.1) to reduce supply-chain risk. Please update to the pinned SHA/version used elsewhere in .github/workflows/.

Suggested change
- uses: actions/checkout@v4
- uses: actions/checkout@8e8c483e0f71c1f5f6bbf3c5c8ec0e5c0eb0f3f8 # v6.0.1

Copilot uses AI. Check for mistakes.
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
Comment on lines +16 to +18
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

steps: is incorrectly indented: the list items (- uses, - name) need to be indented under steps:. As written, this workflow will fail YAML parsing / the steps key will not contain the step list, so the job won’t run.

Suggested change
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

Copilot uses AI. Check for mistakes.
Loading