Migrate docs. #383
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.ACCEPTANCE_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: 'gopalcs1988', | |
repo: 'liquid-acceptance-tests', | |
workflow_id: 'main.yml', | |
ref: 'main' | |
}) |