diff --git a/.github/workflows/docker-publish-hub.yml b/.github/workflows/docker-publish-hub.yml new file mode 100644 index 0000000..d780bed --- /dev/null +++ b/.github/workflows/docker-publish-hub.yml @@ -0,0 +1,43 @@ +name: Publish Docker Image (Hub) + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + +env: + IMAGE_NAME: doctorserver/steamcmd + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest + + - name: Push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: true + provenance: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }}