Skip to content

Commit f5205f1

Browse files
authored
Merge pull request #207 from rootcodelabs/wip
Get update from wip
2 parents 9d45282 + 45fbf7b commit f5205f1

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

.env.notification

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
RELEASE=notification-server
2+
VERSION=1
3+
BUILD=1
4+
FIX=1
5+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and publish notification
2+
3+
on:
4+
push:
5+
branches:
6+
- wip
7+
paths:
8+
- '.env.notification'
9+
10+
jobs:
11+
PackageDeploy:
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Docker Setup BuildX
18+
uses: docker/setup-buildx-action@v2
19+
20+
- name: Load environment variables and set them
21+
run: |
22+
if [ -f .env.notification ]; then
23+
export $(cat .env.notification | grep -v '^#' | xargs)
24+
fi
25+
echo "RELEASE=$RELEASE" >> $GITHUB_ENV
26+
echo "VERSION=$VERSION" >> $GITHUB_ENV
27+
echo "BUILD=$BUILD" >> $GITHUB_ENV
28+
echo "FIX=$FIX" >> $GITHUB_ENV
29+
- name: Set repo
30+
run: |
31+
LOWER_CASE_GITHUB_REPOSITORY=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')
32+
echo "DOCKER_TAG_CUSTOM=ghcr.io/${LOWER_CASE_GITHUB_REPOSITORY}:$RELEASE-$VERSION.$BUILD.$FIX" >> $GITHUB_ENV
33+
echo "$GITHUB_ENV"
34+
- name: Docker Build
35+
run: |
36+
cd notification-server && docker image build --tag $DOCKER_TAG_CUSTOM -f Dockerfile .
37+
38+
- name: Log in to GitHub container registry
39+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
40+
41+
- name: Push Docker image to ghcr
42+
run: docker push $DOCKER_TAG_CUSTOM

0 commit comments

Comments
 (0)