-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (52 loc) · 1.84 KB
/
push-image-ghcr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy Docker Image to GHCR
on:
workflow_dispatch:
inputs:
bump-version:
type: choice
required: true
description: Bump version
default: patch
options:
- patch
- minor
- major
- none
jobs:
bump-version:
name: "Bump Image VERSION"
if: inputs.bump-version != 'none'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Auto Bump
run: ./scripts/bump-version.sh ${{inputs.bump-version}}
- uses: stefanzweifel/git-auto-commit-action@v5
push-store-image:
needs: bump-version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Version
run: echo "TERMINOLOGY_SERVER_VERSION=$(cat $(pwd)/VERSION)" >> $GITHUB_ENV
- name: Log Version
run: echo "Building Version $TERMINOLOGY_SERVER_VERSION"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build & Push Terminology Server Image"
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ghcr.io/bonfhir/terminology-server:latest,ghcr.io/bonfhir/terminology-server:v${{ env.TERMINOLOGY_SERVER_VERSION }}
outputs: type=image,name=target,annotation-index.org.opencontainers.image.source=https://github.com/bonfhir/terminology-server,annotation-index.org.opencontainers.image.description=A HAPI docker image with automatic code system bootstraping