-
Notifications
You must be signed in to change notification settings - Fork 84
66 lines (64 loc) · 2.05 KB
/
build_publish_openelis.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
61
62
63
64
65
66
name: Build and Publish OpenELIS
on:
push:
branches:
- master
- 'release-*'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- '**.md'
jobs:
docker-build-publish:
name: Build & Publish OpenELIS Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Java 7 for ant
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '7'
- name: Setup Ruby 2.5
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
- name: Install Compass
run: gem install compass
- name: Install Ant 1.9
run: |
mkdir /tmp/ant
cd /tmp/ant
wget https://dlcdn.apache.org//ant/binaries/apache-ant-1.9.16-bin.tar.gz
tar -zxf apache-ant-1.9.16-bin.tar.gz
echo "ANT_HOME=/tmp/ant/apache-ant-1.9.16" >> $GITHUB_ENV
echo "/tmp/ant/apache-ant-1.9.16/bin" >> $GITHUB_PATH
- name: Set env.ARTIFACT_VERSION
run: |
wget -q https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/setArtifactVersion.sh && chmod +x setArtifactVersion.sh
./setArtifactVersion.sh
rm setArtifactVersion.sh
- name: Package
run: ant dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Docker Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
file: package/docker/openelis/Dockerfile
push: true
tags: bahmni/openelis:${{env.ARTIFACT_VERSION}},bahmni/openelis:latest
- name: Push Translations to Transifex
run: |
bash .github/scripts/transifex.sh
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}