Skip to content

BAH-3944 | Fix. Markdown Violations In README.md #23

BAH-3944 | Fix. Markdown Violations In README.md

BAH-3944 | Fix. Markdown Violations In README.md #23

name: Build and Publish atomfeed-console Image
on:
push:
branches: [master]
paths:
- 'atomfeed-console/**'
- '.github/workflows/atomfeed_console_build_publish.yaml'
repository_dispatch:
types:
- atomfeed-console-trigger
jobs:
Trivy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Trivy Scan
run: ./.github/trivy_scan.sh atomfeed-console .github/workflows/atomfeed_console_build_publish.yaml
docker-build-publish:
name: Docker Build & Publish
runs-on: ubuntu-latest
needs: Trivy
steps:
- uses: actions/checkout@v2
- name: Verify app version
run: |
APP_VERSION=$(cat atomfeed-console/.appversion)
if [ $(git tag -l "$APP_VERSION") ]; then
echo "App version $APP_VERSION already released. Please update app version in package/.appversion to represent next major/minor/patch increment"
exit 1
else
echo "setting artifact version to $(echo $APP_VERSION-${{github.run_number}})"
echo "ARTIFACT_VERSION=$(echo $APP_VERSION-${{github.run_number}})" >> $GITHUB_ENV
fi
- name: Download atomfeed-console jar
run: |
curl -H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/ICT4H/atomfeed-console/actions/artifacts | \
jq -r '.artifacts[0].archive_download_url' | \
xargs curl -L -o atomfeed-console-SNAPSHOT.zip -H "Authorization: token ${{secrets.BAHMNI_PAT}}"
unzip atomfeed-console-SNAPSHOT.zip -d atomfeed-console/resources/
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Docker Build and push
uses: docker/build-push-action@v2
with:
context: atomfeed-console/
no-cache: true
push: true
tags: bahmni/atomfeed-console:${{env.ARTIFACT_VERSION}},bahmni/atomfeed-console:latest