publish as package #7
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 image | |
on: | |
push: | |
workflow_dispatch: | |
repository_dispatch: | |
jobs: | |
docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: docker build -f Dockerfile -t btwiuse/portmux:${{ github.sha }} . | |
name: docker build | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- run: docker push btwiuse/portmux:${{ github.sha }} | |
name: docker push | |
- run: | | |
docker tag btwiuse/portmux:${{ github.sha }} btwiuse/portmux | |
docker push btwiuse/portmux | |
if: github.ref == 'refs/heads/main' | |
name: docker push latest |