- I was trying to build a Docker Image from a Dockerfile file in my repository using/inside the GitHub action.
- The image should be created for the last commit on a pull request.
- I was running the Github Actions on
issue_commentbasis which also involves pull request comments and I tried to use
docker buildcommand inside this like:
name: Litmus-CI on: issue_comment: types: [created, edited] jobs: tests: if: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '/run-e2e') runs-on: ubuntu-latest steps: - name: Running git checkout uses: actions/checkout@v2 - name: Build docker image run: | sudo docker build . -f build/ansible-runner/Dockerfile -t uditgaurav/demo-litmus-e2e:v1 sudo docker images
So will the image build using the above code will be on the last commit on pull request basis or it will be a general image build of the repository?
secondly, Are there any actions around this - for building the image of the last commit in PR?