Added pipeline to buid container and push to ghcr.io

This commit is contained in:
Izzy Irvine
2025-04-23 00:23:04 +12:00
committed by Peter Smit
parent 76c58a7f61
commit a86e92e414
2 changed files with 46 additions and 0 deletions

43
.github/workflows/cd.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Create and publish a Docker image
on:
push:
tags:
- '*'
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Downcase repo
run: |
echo "REPO=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ env.REPO }}:${{ github.ref_name }}
ghcr.io/${{ env.REPO }}:latest

View File

@@ -68,6 +68,9 @@ Here is the current state of translation:
3. Run `npm run start-container` to start the postgres and the spliit2 containers
4. You can access the app by browsing to http://localhost:3000
You could also pull it from the container registry:
```docker pull ghcr.io/spliit-app/spliit:latest```
## Opt-in features
### Expense documents