Skip to content

feat(#109): add cash payment method in ui #29

feat(#109): add cash payment method in ui

feat(#109): add cash payment method in ui #29

name: Create and publish Docker image
on:
push:
branches:
- 'issue-109-prep'
jobs:
build-and-push-image:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- name: install Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout repository
run: 'git clone -b "$BRANCH_OR_TAG_NAME" --depth 1 "$FULL_REPO_URL" app'
shell: bash
env:
FULL_REPO_URL: "https://github.com/${{ github.repository }}"
BRANCH_OR_TAG_NAME: ${{ github.ref_name }}
- name: Log in to the Container registry
run: 'echo "$REGISTRY_PASS" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin'
shell: bash
env:
REGISTRY: 'ghcr.io'
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASS: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build and push image
run: >
cd app &&
chmod 755 gradlew &&
./gradlew --no-daemon --console=plain clean jar &&
TAG_ARGS=$(echo -n "$IMAGE_TAGS" | sed -r "s_([^ :/]+)_ --tag $REGISTRY/$IMAGE_NAME:\1 _g") &&
docker build
--label org.opencontainers.image.url="$FULL_REPO_URL"
--label org.opencontainers.image.revision="$COMMIT_HASH"
$TAG_ARGS
--pull
. &&
docker push -a "$REGISTRY/$IMAGE_NAME"
shell: bash
env:
REGISTRY: 'ghcr.io'
IMAGE_NAME: ${{ github.repository }}
IMAGE_TAGS: latest
FULL_REPO_URL: "https://github.com/${{ github.repository }}"
COMMIT_HASH: ${{ github.sha }}