Skip to content
Merged
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions .github/workflows/ci-skip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci

# Counterpart to ci.yml: when a change can't affect the image, report the
# required `build` and `test` checks as passed without building anything.
# Keep the path list identical to the one in ci.yml.
on:
push:
branches:
- main
paths-ignore:
- Dockerfile
- docker-bake.hcl
- .github/workflows/ci.yml
pull_request:
branches:
- main
paths-ignore:
- Dockerfile
- docker-bake.hcl
- .github/workflows/ci.yml
Comment on lines +17 to +20

jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "No image-affecting changes; skipping build."
test:
runs-on: ubuntu-latest
needs: build
steps:
- run: echo "No image-affecting changes; skipping tests."
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
name: ci

# The image depends only on these files (the Dockerfile has no COPY/ADD), so
# other changes skip the build. ci-skip.yml reports the same required checks
# as passed for those changes. Keep both path lists identical.
on:
push:
branches:
- main
paths:
- Dockerfile
- docker-bake.hcl
- .github/workflows/ci.yml
pull_request:
branches:
- main
paths:
- Dockerfile
- docker-bake.hcl
- .github/workflows/ci.yml

jobs:
build:
Expand Down
10 changes: 8 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Steps:
`git checkout main && git pull && git checkout -b release/vX.Y.Z`
2. Update the version:
- `Dockerfile`: the `@microsoft/generator-sharepoint` version.
- `README.md`: in the Available tags section, update `latest` and `online` and add a row for `X.Y.Z`.
- `README.md`: the version in parentheses in the note under the title, and in the Available tags section update `latest` and `online` and add a row for `X.Y.Z`.
- `README.md`: the Visual Studio development containers link points to `docs/vX.Y.Z/DevelopmentContainers.md`.
- Run `grep -rn "<old-version>"` to catch any other references.
3. Create the versioned docs folder as described in "Versioned docs" above.
Expand All @@ -52,4 +52,10 @@ Steps:
- Soft reset to it: `git reset --soft <last-tag>`
- Commit again with the same message.
6. Push the branch and open a PR: `git push -u origin release/vX.Y.Z`, then `gh pr create --title "feat: new SPFx version vX.Y.Z"`.
7. After the PR merges, tag the merged commit on main: `git checkout main && git pull && git tag vX.Y.Z && git push origin vX.Y.Z`.
7. After the PR merges, tag the merged commit on main: `git checkout main && git pull && git tag vX.Y.Z && git push origin vX.Y.Z`. Pushing the tag is what publishes the release (see "CI flow" below). Never tag the release branch: the repo squash-merges, so a tag there points at a commit that isn't on main, and pushing it would publish an image before review.

## CI flow

- `ci.yml` runs on PRs and pushes to main that touch `Dockerfile`, `docker-bake.hcl`, or itself. It builds the test stages and does not publish anything. For any other change, `ci-skip.yml` reports the same required `build` and `test` checks as passed without building. The path lists in the two files must stay identical.
- `build-and-push.yaml` runs only when a `vX.Y.Z` tag is pushed. It builds the multiplatform image and pushes it to Docker Hub as `X.Y.Z`, `latest`, and `online`. Merging a PR does not trigger it.
- `update-dockerhub-description.yaml` runs automatically after a successful "Image Build and Push" and syncs the root `README.md` to the Docker Hub repository overview. It can also be run manually from the Actions tab.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Docker images for running the [SharePoint Framework](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview) development environment.

> This README covers the **latest** SharePoint Framework version. For instructions for other versions, see the [versioned docs folder](https://github.com/pnp/docker-spfx/tree/main/docs) on GitHub.
> This README covers the **latest** SharePoint Framework version (1.24.2). For instructions for other versions, see the [versioned docs folder](https://github.com/pnp/docker-spfx/tree/main/docs) on GitHub.


[![Pulls from Docker Hub](https://img.shields.io/docker/pulls/m365pnp/spfx.svg)](https://hub.docker.com/r/m365pnp/spfx)
Expand Down