attempt to fix docker #40
Workflow file for this run
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: Docker push | |
# This builds the docker image and pushes it to DockerHub | |
# Runs on cov-lineages/pangolin repo releases | |
# and push event to 'dev' branch (PR merges) | |
on: | |
push: | |
branches: | |
- dev | |
release: | |
types: [published] | |
jobs: | |
push_dockerhub: | |
name: Push new Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'polio-nanopore/piranha' }} | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }} | |
steps: | |
- name: Remove unnecessary files | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Check out pipeline code | |
uses: actions/checkout@v2 | |
- name: Build new docker image | |
run: docker build --no-cache . -t polionanopore/piranha:latest | |
- name: Push Docker image to DockerHub (dev) | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | |
docker tag polionanopore/piranha:latest polionanopore/piranha:dev | |
docker push polionanopore/piranha:dev | |
- name: Push Docker image to DockerHub (release) | |
if: ${{ github.event_name == 'release' }} | |
run: | | |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | |
docker push polionanopore/piranha:latest | |
docker tag polionanopore/piranha:latest polionanopore/piranha:${{ github.event.release.tag_name }} | |
docker push polionanopore/piranha:${{ github.event.release.tag_name }} | |
docker tag polionanopore/piranha:latest coreyansley/artifice_piranha:latest | |
docker push coreyansley/artifice_piranha:latest |