adding docker push to hub

This commit is contained in:
Andy Pack 2024-02-07 19:04:04 +00:00
parent 8d92a97850
commit 6dc0060980
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -3,7 +3,6 @@ name: Build Binaries
on: on:
# Runs on pushes targeting the default branch # Runs on pushes targeting the default branch
push: push:
branches: ["master"]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions: permissions:
@ -87,3 +86,26 @@ jobs:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v4 uses: actions/deploy-pages@v4
package:
runs-on: ubuntu-latest
name: Package Container
needs: [ build ] # for ignoring bad builds
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & Push Container
uses: docker/build-push-action@v2
with:
push: true
tags: sarsoo/dnstp:latest