Enable workflow for pull requests in dockerimage.yml #478
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: Build and Publish Docker Images | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/**' | |
- '.gitignore' | |
- 'README.md' | |
- '*/*/README.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/**' | |
- '.gitignore' | |
- 'README.md' | |
- '*/*/README.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
git fetch --prune --unshallow | |
- name: get changed files | |
id: getfile | |
run: | | |
echo "files=$(git diff --no-commit-id --name-only ${{ github.event.before }} ${{ github.sha }} | xargs)" >> "$GITHUB_ENV" | |
- name: Build, Tag, Publish Docker | |
uses: ./.github/actions/build-image | |
with: | |
organization: jessemarks | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} |