Skip to content

Commit

Permalink
Push image to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
amenk authored Jun 2, 2024
1 parent 24bff2e commit 7d8c8bc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

Expand All @@ -14,5 +12,14 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Login to Github Packages
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag opg-pages:$(date +%s)
if: github.ref == 'refs/heads/opg-master'
run: |
docker build . --file Dockerfile --tag ghcr.io/openplaceguide/opg-pages:latest
docker push ghcr.io/openplaceguide/opg-pages:latest

0 comments on commit 7d8c8bc

Please sign in to comment.