From 6dc0060980eb806f0a4743d57b90e917c8f787ca Mon Sep 17 00:00:00 2001 From: Andy Pack Date: Wed, 7 Feb 2024 19:04:04 +0000 Subject: [PATCH] adding docker push to hub --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8da4dcd..edaaeee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,6 @@ name: Build Binaries on: # Runs on pushes targeting the default branch push: - branches: ["master"] # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -86,4 +85,27 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + 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 \ No newline at end of file