diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 64b6844..be81c34 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,9 +6,16 @@ on: pull_request: branches: [ "main" ] +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -16,7 +23,7 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - registry: ghcr.io + registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -24,7 +31,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: timower/rm-docker + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build uses: docker/build-push-action@v5