Add melange/apko build pipeline and Kubernetes manifests
- Add melange.yaml for distroless package build - Add apko.yaml for minimal container image - Add GitHub Actions workflow for melange/apko CI build - Add Kubernetes manifests (deployment, service, configmap, secret, redis) - Update Dockerfile, .gitignore, and docker-compose.yml
This commit is contained in:
1 parent
cc3581aa4d
commit
9c49e79657
15 files changed
+382
-7
No files matched your search
@@ -36,7 +36,46 @@ jobs:
|
||||
coverage run -m pytest tests/ -v
|
||||
coverage report
|
||||
|
||||
build:
|
||||
build-melange-apko:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-and-test
|
||||
if: github.event_name != 'pull_request'
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate melange signing keypair
|
||||
uses: chainguard-dev/actions/melange-keygen@main
|
||||
with:
|
||||
signing-key-path: melange.rsa
|
||||
|
||||
- name: Build package with melange
|
||||
uses: chainguard-dev/actions/melange-build@main
|
||||
with:
|
||||
config: melange.yaml
|
||||
signing-key-path: melange.rsa
|
||||
archs: x86_64,aarch64
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish image with apko
|
||||
uses: chainguard-images/actions/apko-publish@main
|
||||
with:
|
||||
config: apko.yaml
|
||||
archs: x86_64,aarch64
|
||||
tag: ghcr.io/k2patel/apcupsd-client:latest
|
||||
keyring-append: melange.rsa.pub
|
||||
|
||||
build-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-and-test
|
||||
if: github.event_name != 'pull_request'
|
||||
@@ -60,4 +99,4 @@ jobs:
|
||||
docker build . -t ${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Push the Docker image
|
||||
run: docker push ${{ env.IMAGE_NAME }}
|
||||
run: docker push ${{ env.IMAGE_NAME }}
|
||||
Reference in new issue
Block a user