Enable workflow for pull requests in dockerimage.yml #466
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-tree --no-commit-id --name-only -r ${{ github.sha }} | xargs)" >> "$GITHUB_ENV" | |
- name: Build, Tag, Publish Docker | |
uses: ./.github/actions/build-image | |
with: | |
organization: jessemarks | |
changed_files: ${{ env.files }} | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} |