Files
Holocore/.github/workflows/deploy.yml
T
Mads Boddum 81d0883446 build: moved jlink build inside the Docker image build, so building the Docker image works on any host OS
Problem was that jlink produces OS-specific artifacts, so you couldn't make a functional Docker image on Windows.
Final Docker image size has also been reduced, roughly from 240MB to 170MB, by using Alpine as the new base image.
Support for Debian Stretch ended on the 30th of June 2022.
2023-08-19 01:23:46 +02:00

38 lines
1.3 KiB
YAML

name: Deploy
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Docker Login
run: docker login docker.pkg.github.com -u "${{ secrets.DOCKER_USER }}" -p "${{ secrets.DOCKER_PASS }}"
- name: Docker Build & Push
run: |
IMAGE_NAME=`echo "docker.pkg.github.com/${GITHUB_REPOSITORY,,}/holocore"`
RELEASE_NAME=`echo $GITHUB_REF | sed 's/refs\/tags\///g'`
docker build -t "$IMAGE_NAME:$RELEASE_NAME" .
docker push "$IMAGE_NAME:$RELEASE_NAME"
- name: Docker Push to QA
if: github.event.release.prerelease
run: |
IMAGE_NAME=`echo "docker.pkg.github.com/${GITHUB_REPOSITORY,,}/holocore"`
RELEASE_NAME=`echo $GITHUB_REF | sed 's/refs\/tags\///g'`
docker tag "$IMAGE_NAME:$RELEASE_NAME" "$IMAGE_NAME:cu_quality_assurance"
docker push "$IMAGE_NAME:cu_quality_assurance"
- name: Docker Push to Master
if: github.event.release.prerelease == false
run: |
IMAGE_NAME=`echo "docker.pkg.github.com/${GITHUB_REPOSITORY,,}/holocore"`
RELEASE_NAME=`echo $GITHUB_REF | sed 's/refs\/tags\///g'`
docker tag "$IMAGE_NAME:$RELEASE_NAME" "$IMAGE_NAME:cu_latest"
docker push "$IMAGE_NAME:cu_latest"