diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2bfc77a..78ae9a5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,8 +16,6 @@ on: branches: [ "main" ] env: - # Use docker.io for Docker Hub if empty - REGISTRY: ghcr.io # github.repository as / IMAGE_NAME: ${{ github.repository }} PLATFORM: linux/amd64 @@ -45,12 +43,19 @@ jobs: uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} + - name: Log in to Docker registry + if: github.event_name != 'pull_request' + uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + # Login against a Docker registry except on PR + - name: Log in to Github registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: - registry: ${{ env.REGISTRY }} + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -60,7 +65,9 @@ jobs: id: meta uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: | + ${{ env.IMAGE_NAME }} + ghcr.io/${{ env.IMAGE_NAME }} tags: | # set latest tag for default branch type=raw,value=latest,enable={{is_default_branch}} diff --git a/README.md b/README.md index b51f188..694e656 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ docker run --rm -it -d \ --privileged \ --name xz-backdoor \ --platform linux/amd64 \ - ghcr.io/rezigned/xz-backdoor-container-image:latest + ghcr.io/rezigned/xz-backdoor:latest ``` **2. Run a command via `xzbot`**