diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f4a01b9..76e0059 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -8,8 +8,8 @@ on: branches: [ "main", "master" ] env: - REGISTRY: docker.io - IMAGE_NAME: ck98/ck98-dockul + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} jobs: build: @@ -17,6 +17,7 @@ jobs: permissions: contents: read packages: write + id-token: write steps: - name: Checkout repository @@ -28,12 +29,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub + - name: Log in to GitHub Container Registry if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta