name: Silvanus Production Dockerization on: pull_request: branches: - main env: DHUB_UNAME: ${{ secrets.DHUB_UNAME }} DHUB_PWORD: ${{ secrets.DHUB_PWORD }} jobs: build: runs-on: self-hosted steps: - name: Move into build directory run: cd /home/git/silvanus - name: Pull latest files run: git pull - name: Checkout from HEAD run: git checkout $GITHUB_HEAD_REF - name: Build the Docker image run: docker build . --file Dockerfile --tag v0idf1sh/silvanus - name: Log into Docker Hub run: docker login -u $DHUB_UNAME -p $DHUB_PWORD - name: Push image to Docker Hub run: docker push v0idf1sh/silvanus