Skip to content

Commit

Permalink
docs: Update readme with explanation of the publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacurtiss committed Feb 26, 2025
1 parent 1823afa commit d563e3f
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,52 @@ it handles pulling fresh container images:
deploy production.yml --upgrade
```

### Using the `publish` script

For all environments, the `publish` script helps with building and publishing container
images from your workstation to our container registry. It builds the image using the UIC
Pharmacy standards, such as:

- Uses semantic versioning based on the `version` defined in `package.json`, including
intelligent re-tagging of major versions. For instance, version `1.2.3` will also
tag versions `1` and `1.2`, however a prerelease like `1.2.3-beta.1` will not.
- Automatically adds the image to the correct repo as long as its `homepage` is set in
`package.json`.
- Creates a multi-arch manifest, so images are built for Intel and Apple Silicon
architectures.
- Automatically finds the context and `package.json` by assuming they're in the same
directory as the Dockerfile.

Since podman and buildah do not support non-native architecture builds (i.e. building for
arm64 in an amd64 environment), this script will force building only for your native
architecture when it runs.

You can build and publish the image for a project with a single Dockerfile by just
referencing the Dockerfile in the command:

```bash
# For project 'foo', creates image 'ghcr.io/uicpharm/foo':
publish path/to/Dockerfile
```

If you have a project with multiple Docker files, build them one at a time, assigning an
additional name that can be appended to the image.

```bash
# For project 'foo', creates image 'ghcr.io/uicpharm/foo/bar':
publish path/to/Dockerfile.bar --name=bar
```

If you want to make sure it's working without actually publishing, here are some things
you could do to check it:

`--dry-run` will show you the commands that will run, without actually running them.

`--no-push` will build the images but not push them to the registry.

`--verbose` will show you a summary of all the settings that will be used for the build
and publishing process.

### How do I remove the GitHub Runner Service?

If you've installed the GitHub Runner service and now you want to remove it, you can do so
Expand Down

0 comments on commit d563e3f

Please sign in to comment.