Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.notification
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RELEASE=notification-server
VERSION=1
BUILD=1
FIX=1

42 changes: 42 additions & 0 deletions .github/workflows/ci-build-image-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and publish notification

on:
push:
branches:
- wip
paths:
- '.env.notification'

jobs:
PackageDeploy:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2

- name: Docker Setup BuildX
uses: docker/setup-buildx-action@v2

- name: Load environment variables and set them
run: |
if [ -f .env.notification ]; then
export $(cat .env.notification | grep -v '^#' | xargs)
fi
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "BUILD=$BUILD" >> $GITHUB_ENV
echo "FIX=$FIX" >> $GITHUB_ENV
- name: Set repo
run: |
LOWER_CASE_GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')
echo "DOCKER_TAG_CUSTOM=ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}:$RELEASE-$VERSION.$BUILD.$FIX" >> $GITHUB_ENV
echo "$GITHUB_ENV"
- name: Docker Build
run: |
cd notification-server && docker image build --tag $DOCKER_TAG_CUSTOM -f Dockerfile .

- name: Log in to GitHub container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Push Docker image to ghcr
run: docker push $DOCKER_TAG_CUSTOM
Loading