Skip to content

Docker Image CI

Docker Image CI #210

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ release ]
workflow_dispatch:
jobs:
test:
name: "Test"
uses: "./.github/workflows/integration-tests.yml"
build:
name: "Build & Publish"
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- name: Set Version
run: |
CI_VERSION=$(cat ./src/VERSION)
echo "CI_VERSION=$CI_VERSION" >> $GITHUB_ENV
- name: Build the Docker image
run: docker build . --file Dockerfile -t shrihariprakash/liquid:$CI_VERSION -t "shrihariprakash/liquid:latest" -t ghcr.io/shrihari-prakash/liquid:$CI_VERSION -t "ghcr.io/shrihari-prakash/liquid:latest"
- name: Docker Hub Login
run: docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}}
- name: Docker Hub Push
run: docker push shrihariprakash/liquid --all-tags
- name: GHCR Login
run: docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} -p ${{ secrets.GHCR_TOKEN }}
- name: GHCR Push Latest
run: docker push ghcr.io/shrihari-prakash/liquid:latest
- name: GHCR Push Version
run: docker push ghcr.io/shrihari-prakash/liquid:$CI_VERSION
acceptance_tests:
name: "Run Acceptance Tests"
runs-on: ubuntu-latest
needs: build
steps:
- name: Call Acceptance workflow
uses: convictional/[email protected]
with:
owner: gopalcs1988
repo: liquid-acceptance-tests
github_token: ${{ secrets.ACCEPTANCE_TOKEN }}
workflow_file_name: main.yml
ref: main
wait_interval: 10
propogate_failure: true
trigger_workflow: true
wait_workflow: true