diff --git a/.github/workflows/build-push-dockerhub.yaml b/.github/workflows/build-push-dockerhub.yaml index 76590e0..0b3eda3 100644 --- a/.github/workflows/build-push-dockerhub.yaml +++ b/.github/workflows/build-push-dockerhub.yaml @@ -5,26 +5,16 @@ on: push: branches: - 'main' + - 'migrate-to-ghcr' jobs: docker: runs-on: ubuntu-latest steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v4 + - name: Build and publish Docker image for ${{ github.repository }} + uses: macbre/push-to-ghcr@master with: - push: true - tags: ${{ vars.DOCKERHUB_TAG }} - + image_name: ${{ github.repository }} + github_token: ${{ secrets.GITHUB_TOKEN }}