So coming back to the YAML file, we have seen how the workflow triggering is done in an automated way.
What is left to explore is if we want to do a manual triggering of the workflow.
We will go through the steps briefly, but first I wanted to bring to your attention the fact that if
we trigger the workflow as it is, the pipeline will run, but the actual jobs will be skipped since
none of the files will have changed from the last commit.
So what we can do is to change all the if conditions in our jobs.
So this will be the if statements here with the changed files, build ID and also the if statements
here with the change file tests ID.
The change in the if condition will look as follows.
So here what we are saying is that all of these steps will run if either a change is done in any of
the docker file or requirements.txt, or if the event name is the workflow dispatch, which means that
we will trigger a manual workflow dispatch workflow.
So let's do this change for all the if statements.
So let's save the YAML file and commit and push our changes first.
We have pushed.
And just to recap we will be testing out the function here the workflow dispatch which coincides with
what we just defined for the event name here.
Let's refresh.
So as you can see, this is the second run of the CI CD pipeline.
When we look into the actual running, the build and push image did not run the setup.
Docker build x up until the build and push docker image, which means that the actual files are being
skipped.
Same happens for the end integration and end to end tests.
The first job initial setup will work, but these jobs which had the if condition were skipped.
Since we have now pushed our changes, let's go on the Cicd pipeline and trigger this run workflow so
that we can see all the changes being triggered and run using the workflow dispatch.
As you can see, the pipeline is running right now.
Since in the if condition, we no longer have only this set to true, but we also have this or condition
over here.
Once we trigger the CI CD pipeline through a workflow dispatch, none of the previous steps that were
previously being skipped will be now skipped.
And same applies for the second job as you saw before.
This was being skipped, but now that we have the condition, the job is being run.
Once all of these finish the run, we should also get a success.
Green tick.
Same as we had for the first run.
So while this is running, we can also double check that the Docker image has been pushed and we have
a new tag for the new updated image.
So let's refresh this.
And as you can see here we have the latest image with the new latest tags.
And same as before we also have a success for both jobs.
So like this.
We have covered both automated and manual triggering of our CI CD pipeline.
And with that we can wrap up the CI CD portion.
And we also can conclude this course.