Skip to content

Commit

Permalink
Push image
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Jan 18, 2024
1 parent 28a5b2f commit b69d552
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [ "main" ]

env:
IMAGE_NAME: vancouver-blocks
VERSION: latest

jobs:

build:
Expand All @@ -17,6 +21,11 @@ jobs:
- name: Build the Docker image
run: |
cd docs/examples/vancouver_blocks
docker build . --file Dockerfile --tag my-image-name:$(date +%s)
docker build . --file Dockerfile --tag IMAGE_NAME
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION

0 comments on commit b69d552

Please sign in to comment.