diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..1fbe2dc --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,44 @@ +name: Docker + +on: + push: + branches: [ "main" ] + paths-ignore: + - '**.md' + pull_request: + branches: [ "main" ] + paths-ignore: + - '**.md' + +env: + IMAGE_NAME: watchyourlan + TAGS: v0.5 + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Build and Push Docker Image to ghcr.io + uses: mr-smithers-excellent/docker-build-push@v5 + with: + image: ${{ env.IMAGE_NAME }} + tags: ${{ env.TAGS }} + addLatest: true + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Docker Image to docker.io + uses: mr-smithers-excellent/docker-build-push@v5 + with: + image: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} + tags: ${{ env.TAGS }} + addLatest: true + registry: docker.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file