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