Skip to content

splited the cicd workflow #1

splited the cicd workflow

splited the cicd workflow #1

name: build & push img
on:
workflow_run:
workflows: ['pull latest prod model']
types:
- completed
jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
build-nd-push-docker-image:

Check failure on line 11 in .github/workflows/build_push_img.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_push_img.yaml

Invalid workflow file

You have an error in your yaml syntax on line 11
name: build & push img to dockerhub
needs: pull-latest-model # previous stage must be successfully completed (job dependency)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Print Current Directory be-down # for debug purpose
run: ls /home/runner/work/cicd-aws/cicd-aws
- name: Download Model Artifacts # download the previously saved artifacts
uses: actions/download-artifact@v2
with:
name: model
path: /home/runner/work/cicd-aws/cicd-aws
- name: Print Current Directory af-down # for debugging
run: ls /home/runner/work/cicd-aws/cicd-aws
# push img to docker hub
- name: Build Docker Image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/wineqcicdaws:latest .
- name: Log-in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker Img # push the previously built img to dockerhub
run: docker push ${{ secrets.DOCKER_USERNAME }}/wineqcicdaws:latest