Skip to content

Commit

Permalink
Set ghcr.io and image name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
timower committed Oct 1, 2023
1 parent 0037188 commit f392892
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,32 @@ 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

- 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 }}

- name: Docker meta
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
Expand Down

0 comments on commit f392892

Please sign in to comment.