https://github.com/vshn/container-build-example
Build Container Images on GitHub
https://github.com/vshn/container-build-example
vshn-project-ignore
Last synced: 3 months ago
JSON representation
Build Container Images on GitHub
- Host: GitHub
- URL: https://github.com/vshn/container-build-example
- Owner: vshn
- Created: 2023-05-19T15:37:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-27T09:11:02.000Z (12 months ago)
- Last Synced: 2025-01-29T01:45:53.370Z (5 months ago)
- Topics: vshn-project-ignore
- Language: Dockerfile
- Homepage: https://www.vshn.ch/
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VSHN Container Build Example
This repository aims to demonstrate how to build container images with GitHub Actions, and push them to the GitHub Container Registry (GHCR).
## How it works
The container build will be triggered when you
* push a Git tag
* push to the `main` branch
* open a PRThe workflow will determine the tags to use based on the event that triggered a workflow, see the [docker/metadata-action documentation](https://github.com/docker/metadata-action#basic) for a detailed explanation. TL;DR:
* PR -> `pr-N`
* Push to `main` -> `main`
* Push to a tag -> `$TAG` (and also `latest` if the tag resembles a SemVer number)## Troubleshooting
### "Permission denied" when trying to push a new image
This can happen if a GitHub Package by the same name already exists, either because it has been pushed or created manually, or if the repository was deleted and recreatd.
To fix this, go to the organization's "Packages" list (e.g. https://github.com/orgs/vshn/packages), and delete the conflicting package (if that's reasonable to do!).