Skip to content

Commit

Permalink
Merge pull request #119 from eurofurence/issue-109-prep
Browse files Browse the repository at this point in the history
#109 prep
  • Loading branch information
Jumpy-Squirrel authored Jan 13, 2024
2 parents 23eae30 + 170ea43 commit 7658f41
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Create and publish Docker image
on:
push:
branches:
- 'issue-109-prep'
- 'main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-and-push-image:
Expand Down Expand Up @@ -33,7 +35,8 @@ jobs:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASS: ${{ secrets.GITHUB_TOKEN }}

- name: Docker build and push image
- name: Docker build and push 'latest' image
if: startsWith(github.ref, 'refs/heads/')
run: >
cd app &&
chmod 755 gradlew &&
Expand All @@ -53,3 +56,26 @@ jobs:
IMAGE_TAGS: latest
FULL_REPO_URL: "https://github.com/${{ github.repository }}"
COMMIT_HASH: ${{ github.sha }}

- name: Docker release build and push (v0.1)
if: startsWith(github.ref, 'refs/tags/v0.1.')
run: >
cd app &&
chmod 755 gradlew &&
./gradlew --no-daemon --console=plain clean jar &&
docker build
--label org.opencontainers.image.url="$FULL_REPO_URL"
--label org.opencontainers.image.revision="$COMMIT_HASH"
--label org.opencontainers.image.version="$IMAGE_TAG"
--tag $REGISTRY/$IMAGE_NAME:$IMAGE_TAG
--tag $REGISTRY/$IMAGE_NAME:v0.1
--pull
. &&
docker push -a "$REGISTRY/$IMAGE_NAME"
shell: bash
env:
REGISTRY: 'ghcr.io'
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG: ${{ github.ref_name }}
FULL_REPO_URL: "https://github.com/${{ github.repository }}"
COMMIT_HASH: ${{ github.sha }}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public static TransactionType byValueOrDefault(String v, TransactionType default

public enum Method {
CREDIT("credit"),
PAYPAL("paypal"),
TRANSFER("transfer"),
CASH("cash"),
PAYPAL("paypal"),
INTERNAL("internal"),
GIFT("gift");

Expand Down

0 comments on commit 7658f41

Please sign in to comment.