Skip to content

Commit

Permalink
change git diff files
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Oct 12, 2020
1 parent 62f01f0 commit b521510
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,33 @@ jobs:
- name: checkout repo
uses: actions/checkout@v2
#------------------------------------------------------------------------#
# Check only for changes in conda and dockerfile
- name: check for changes
id: git-diff
uses: technote-space/get-diff-action@v1
with:
FILES: |
workflow/envs/main/Dockerfile
workflow/envs/main/main.yaml
# Checkout Repository
Dockerfile
main.yaml
# build docker image
- name: docker build
if: env.GIT_DIFF
run: docker build --no-cache . -t ktmeaton/plague-phylogeography:latest

if: steps.git-diff.outputs.diff
run: |
cd workflow/envs/main/;
docker build --no-cache . -t ktmeaton/plague-phylogeography:latest;
#------------------------------------------------------------------------#
# tag and upload
- name: docker push (dev)
if: env.GIT_DIFF && ${{ github.event_name == 'push' }}
if: steps.git-diff.outputs.diff && ${{ github.event_name == 'push' }}
run: |
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_PASSWORD }}" --password-stdin
docker tag ktmeaton/plague-phylogeography:latest ktmeaton/plague-phylogeography:dev
docker push ktmeaton/plague-phylogeography:dev
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_PASSWORD }}" --password-stdin;
docker tag ktmeaton/plague-phylogeography:latest ktmeaton/plague-phylogeography:dev;
docker push ktmeaton/plague-phylogeography:dev;
- name: docker push (release)
if: env.GIT_DIFF && ${{ github.event_name == 'release' }}
if: steps.git-diff.outputs.diff && ${{ github.event_name == 'release' }}
run: |
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
docker push ktmeaton/plague-phylogeography:latest
docker tag ktmeaton/plague-phylogeography:latest ktmeaton/plague-phylogeography:${{ github.event.release.tag_name }}
docker ktmeaton/plague-phylogeography:${{ github.event.release.tag_name }}
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin;
docker push ktmeaton/plague-phylogeography:latest;
docker tag ktmeaton/plague-phylogeography:latest ktmeaton/plague-phylogeography:${{ github.event.release.tag_name }};
docker ktmeaton/plague-phylogeography:${{ github.event.release.tag_name }};

0 comments on commit b521510

Please sign in to comment.