diff --git a/.github/workflows/docker-hub-publish.yml b/.github/workflows/docker-hub-publish.yml index 44951b7..a43e98c 100644 --- a/.github/workflows/docker-hub-publish.yml +++ b/.github/workflows/docker-hub-publish.yml @@ -1,31 +1,17 @@ name: Publish Docker image on: - push: - tags: - - '*' + release: + types: [ published ] + jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - - name: Docker meta - id: meta - uses: crazy-max/ghaction-docker-meta@v2 + - uses: actions/checkout@v2 + - name: Build and publish a Docker image for ${{ github.repository }} + uses: macbre/push-to-ghcr@master with: - images: immortalxjo/vastai-k8s-pod-provisioner - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file + image_name: ${{ github.repository }} + github_token: ${{ secrets.GITHUB_TOKEN }} + context: src