Skip to content

Add Docker Image CI workflow#44043

Open
marekdkropiewnicki-dotcom wants to merge 1 commit intogithub:mainfrom
marekdkropiewnicki-dotcom:main
Open

Add Docker Image CI workflow#44043
marekdkropiewnicki-dotcom wants to merge 1 commit intogithub:mainfrom
marekdkropiewnicki-dotcom:main

Conversation

@marekdkropiewnicki-dotcom
Copy link
Copy Markdown

Why:

Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

Copilot AI review requested due to automatic review settings April 30, 2026 09:52
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey there spelunker. It looks like you've modified some files that we can't accept as contributions:

  • .github/workflows/docker-image.yml

You'll need to revert all of the files you changed that match that list using GitHub Desktop or git checkout origin/main <file name>. Once you get those files reverted, we can continue with the review process. :octocat:

The complete list of files we can't accept are:

  • .devcontainer/**
  • .github/**
  • data/reusables/rai/**
  • Dockerfile*
  • src/**
  • package*.json
  • content/actions/how-tos/security-for-github-actions/security-hardening-your-deployments/**

We also can't accept contributions to files in the content directory with frontmatter contentType: rai.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

This pull request contains code changes, so we will not generate a table of review links.

🤖 This comment is automatically generated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub Actions workflow intended to build the repository’s Docker image on pushes and pull requests targeting main.

Changes:

  • Introduces .github/workflows/docker-image.yml to run docker build in CI.
  • Checks out the repository and builds the root Dockerfile image.

Comment on lines +16 to +18
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
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.
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.
Comment on lines +8 to +11

jobs:

build:
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants