Skip to content

Commit 634d50f

Browse files
committed
feat: ensure contents of container image changes
I got confused when the release tagging was being applied to the same release package (container image). This was because the container image was not changing. With this change, we put the contents of the repo into the container image, ensuring there is change and a new image and digest is created. This will also cause new attestation to be created. - [x] remove .github folder from .dockerignore to ensure the folder is put into the container image - [x] update README explaining what the image contents are and why Signed-off-by: jmeridth <[email protected]>
1 parent f5b5282 commit 634d50f

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

.dockerignore

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
# Common
2-
*.md
2+
3+
_.md
34
docker-compose.yml
4-
Dockerfile*
5-
.env*
5+
Dockerfile_
6+
.env\*
67
Makefile
78

89
# Logs
10+
911
logs
10-
*.log
12+
\*.log
1113

1214
# IDE's
15+
1316
.vscode/
1417
.idea/
1518

1619
# Dependency directories
20+
1721
node_modules/
1822
.venv/
1923

2024
## Cache directories
25+
2126
.parcel-cache
2227

2328
# git
29+
2430
.git
2531
.gitattributes
2632
.gitignore
27-
.github/

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
FROM alpine
2-
CMD ["echo", "Hello World!!"]
2+
3+
WORKDIR /app
4+
5+
# copy all files from repo to ensure all changes are included
6+
# which will ensure a new image digest is generated
7+
COPY . .
8+
9+
CMD ["cat", "README.md"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ This is a placeholder repo for multiple GitHub Actions we use in open source pro
2323
> - [labeler.yml](.github/labeler.yml)
2424
> - [release-drafter.yaml](.github/release-drafter.yaml)
2525
26-
> [!WARNING]
27-
> The container image generated in this repo is a placeholder, it contains no content. It uses [alpine:latest and says "Hello World"](https://github.com/github/ospo-reusable-workflows/blob/main/Dockerfile). The image creation option is for GitHub Actions who need it because their Action is not written in JavaScript/Typescript and they want to track downloads/usage.
26+
> [!NOTE]
27+
> The container image generated in this repo is a placeholder, it contains the files of this repository to ensure it shows "change" and a new container image digest is generated. This allows us to see tagging of the new container image is working and newly generated attestation is related to a new SHA/digest in the [packages view](https://github.com/github/ospo-reusable-workflows/pkgs/container/ospo-reusable-workflows).

0 commit comments

Comments
 (0)