Skip to content

Commit

Permalink
Merge pull request #24 from Onlineberatung/VIC-1128
Browse files Browse the repository at this point in the history
[VIC-1128] Improvement DEV Processes
  • Loading branch information
koepferd authored Aug 9, 2022
2 parents 0275d48 + ab61499 commit 950f59f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '1'
version: "1"
rules:
- base: develop
upstream: Onlineberatung:develop
mergeMethod: merge
label: ':arrow_heading_down: pull'
conflictLabel: 'merge-conflict'
- base: develop
upstream: Onlineberatung:develop
mergeMethod: merge
label: ":arrow_heading_down: pull"
conflictLabel: "merge-conflict"
30 changes: 26 additions & 4 deletions .github/workflows/dockerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Publish Docker image

on:
push:
branches:
- "develop"
tags:
- 'dockerImage.v.*'
- "dockerImage.v.*"
- "v*"

jobs:
test:
Expand Down Expand Up @@ -37,6 +40,9 @@ jobs:
name: targetfiles
path: target/*.jar
push_to_registry:
strategy:
matrix:
registry: ["docker.pkg.github.com", "ghcr.io"]
needs: [test]
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
Expand All @@ -46,10 +52,26 @@ jobs:
uses: actions/download-artifact@v2
with:
name: targetfiles
- name: Prepare Docker variables
- name: Get current time
id: time
uses: nanzm/[email protected]
with:
timeZone: 2
format: "YYYYMMDD[_]HHmmss"
- name: Prepare environment variables
run: |
echo "DOCKER_REGISTRY=$(echo "docker.pkg.github.com/${{ github.repository }}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
echo "DOCKER_REGISTRY=$(echo "${{ matrix.registry }}/${{ github.repository }}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
echo "DOCKER_IMAGE=$(echo "${{ github.repository }}" | awk -F / '{print tolower($2)}')" >> $GITHUB_ENV
echo BRANCH=$(echo -n "${GITHUB_REF#refs/heads/}") >> $GITHUB_ENV
echo TIME_STAMP=$(echo -n "${{ steps.time.outputs.time }}") >> $GITHUB_ENV
shell: bash
- name: Set tag for develop image
if: endsWith(env.BRANCH, 'develop') == true
run: echo DOCKER_IMAGE_TAG=$(echo "develop_${{ env.TIME_STAMP }}") >> $GITHUB_ENV
shell: bash
- name: Set tag for default image
if: endsWith(env.BRANCH, 'develop') == false
run: echo DOCKER_IMAGE_TAG=$(echo "${GITHUB_REF/refs\/tags\//}") >> $GITHUB_ENV
shell: bash
- name: Push to GitHub Packages
uses: docker/[email protected]
Expand All @@ -58,4 +80,4 @@ jobs:
password: ${{ secrets.GH_PACKAGE_RELEASE_TOKEN }}
registry: ${{ env.DOCKER_REGISTRY }}
repository: ${{ env.DOCKER_IMAGE }}
tag_with_ref: true
tags: ${{ env.DOCKER_IMAGE_TAG}}
7 changes: 3 additions & 4 deletions .github/workflows/feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name: Feature Branch
on:
push:
branches-ignore:
- 'master'
- 'develop'
- "master"
- "develop"

jobs:
test:
name: Build and run unit tests
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

Expand All @@ -34,4 +33,4 @@ jobs:
run: mvn -B -Pprod clean package -DskipTests

- name: Maven Verify
run: mvn -B -Pprod clean verify
run: mvn -B -Pprod clean verify

0 comments on commit 950f59f

Please sign in to comment.