Skip to content

Commit 9803756

Browse files
committed
update readme
1 parent 17a7c68 commit 9803756

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,26 @@ For an image built locally, you should put the IMAGE_VERSION=local-build.
235235
For an image built from a pull request, you should put the IMAGE_VERSION=<tag of image as show in pull request job>.
236236
You can only use images built from a pull request for testing changes in github actions.
237237

238+
## Using images in github actions
239+
To use the image in github actions, you can use it in github actions using code like this
240+
```
241+
jobs:
242+
my_job_name:
243+
runs-on: ubuntu-22.04
244+
container:
245+
image: ghcr.io/nhsdigital/eps-devcontainers/<container name>:githubactions-<tag>
246+
options: --user 1001:1001
247+
steps:
248+
- name: copy .tool-versions
249+
run: |
250+
cp /home/vscode/.tool-versions "$HOME/.tool-versions"
251+
... other steps ....
252+
```
253+
It is important that
254+
- the image uses the tag starting githubactions-
255+
- there is `options: --user 1001:1001` below image
256+
- the first step copies .tool-versions from /home/vscode to $HOME/.tool-versions
257+
238258
## Generating a .trivyignore file
239259
You can generate a .trivyignore file for known vulnerabilities by either downloading the json scan output generated by the build, or by generating it locally using the scanning images commands above with a make target of scan-image-json
240260

@@ -255,7 +275,7 @@ poetry run python \
255275
```
256276

257277
## Common makefile targets
258-
There are a set of common Makefiles that are defined in `src/base/.devcontainer/makefiles` and are included from `common.mk`. These are installed to all built container images.
278+
There are a set of common Makefiles that are defined in `src/base/.devcontainer/Mk` and are included from `common.mk`. These are installed to /usr/local/share/eps/Mk on the base image so are available for all containers.
259279

260280
This should be added to the end of each projects Makefile to include them
261281
```

0 commit comments

Comments
 (0)