648 new documentation docusaurus #969
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: backend-docker | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
- develop | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
- name: Set environment | |
shell: bash | |
run: | | |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
echo "commit_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Get environment | |
shell: bash | |
run: | | |
echo "sha_short: ${{ env.sha_short }}" | |
echo "commit_date: ${{ env.commit_date }}" | |
echo "version: ${{ env.commit_date }}.${{ env.sha_short }}" | |
- name: "Build main: eap_backend" | |
if: ${{ github.ref == 'refs/heads/main' }} | |
working-directory: eap_backend | |
run: | | |
docker pull turingassuranceplatform/eap_backend:staging | |
docker tag turingassuranceplatform/eap_backend:staging turingassuranceplatform/eap_backend:main | |
docker push turingassuranceplatform/eap_backend --all-tags | |
- name: "Build Docker imager: eap_backend" | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
working-directory: eap_backend | |
run: | | |
docker build -t turingassuranceplatform/eap_backend:${{ env.commit_date }}.${{ env.sha_short }} -t turingassuranceplatform/eap_backend:staging -f Dockerfile . | |
docker push turingassuranceplatform/eap_backend --all-tags |