Skip to content

Commit

Permalink
Merge pull request #8 from DewGew/DewGew-patch-1
Browse files Browse the repository at this point in the history
Update docker-image.yml
  • Loading branch information
DewGew authored Sep 29, 2023
2 parents d0d5994 + 9877af9 commit 1519ef5
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: Docker Image CI
name: Publish Docker Image

on:
push:
branches: [ "development" ]
pull_request:
branches: [ "development" ]

types:
- closed
jobs:

build:

publish-docker-image:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
run: |
docker build . --tag ghcr.io/${{secrets.DOCKER_USER}}/domoticz-google-assistant:latest
docker push ghcr.io/${{secrets.DOCKER_USER}}/domoticz-google-assistant:latest

0 comments on commit 1519ef5

Please sign in to comment.