Improve GitHub Actions deploy workflow (#35)

* Update deploy.yml

* Update deploy.yml
This commit was merged in pull request #35.
This commit is contained in:
2020-08-08 11:17:49 +01:00
committed by GitHub
parent 6fe273e238
commit 9d9d849bc1

View File

@@ -4,16 +4,34 @@ on:
branches: main
jobs:
deploy:
docker-dh:
name: Push to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build image
- name: Build image for Docker Hub
run: docker build . --file Dockerfile --tag luketainton/fhed:latest
- name: Push image
- name: Push image to Docker Hub
run: docker push luketainton/fhed:latest
docker-ghr:
name: Push to GitHub Package Registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | https://docker.pkg.github.com -u luketainton --password-stdin
- name: Build image for GitHub Package Registry
run: docker build . --file Dockerfile --tag docker.pkg.github.com/luketainton/FHeD/fhed:latest
- name: Push image to GitHub Package Registry
run: docker push docker.pkg.github.com/luketainton/FHeD/fhed:latest
deploy:
runs-on: ubuntu-latest
needs: [docker-dh]
steps:
- name: Update image on server
uses: garygrossgarten/github-action-ssh@release
with: