Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Nov 3, 2023
1 parent 78723a4 commit 81a3b62
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 16 deletions.
81 changes: 66 additions & 15 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Publish Docker image

on:
release:
types: [ published ]

# on:
# push:
# branches: [ devel ]
# release:
# types: [ published ]

on:
push:
branches: [ devel ]

jobs:
push_to_registry:
Expand All @@ -15,23 +15,74 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
ref: 'devel'

- name: Retrieve motion-UI version
run: |
echo "VERSION=$(cat ${GITHUB_WORKSPACE}/www/version)" >> $GITHUB_ENV
echo "Version: ${{ env.VERSION }}"
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# Generate automatically tags <https://github.com/docker/metadata-action>
# - name: Docker meta
# id: meta
# uses: docker/metadata-action@v3
# with:
# images: lbr38/motionui
# tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=tag
# type=ref,event=pr
# type=sha

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the container registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

# Build the images
- name: Build and push docker
uses: docker/build-push-action@v2
with:
file: ./docker/Dockerfile
push: true
tags: lbr38/motion:latest, lbr38/motion:${{ env.VERSION }}
platforms: linux/amd64,linux/arm64
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max








# - name: Log in to Docker Hub
# uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_TOKEN }}

# Build the image with '$VERSION' and 'latest' tags
- name: Build the image
run: docker build . --file ./docker/Dockerfile --tag lbr38/motionui:${{ env.VERSION }} --tag lbr38/motionui:latest
# - name: Build the image
# run: docker build . --file ./docker/Dockerfile --tag lbr38/motionui:${{ env.VERSION }} --tag lbr38/motionui:latest

- name: Push the image
run: |
docker push lbr38/motionui:${{ env.VERSION }}
docker push lbr38/motionui:latest
# - name: Push the image
# run: |
# docker push lbr38/motionui:${{ env.VERSION }}
# docker push lbr38/motionui:latest




2 changes: 1 addition & 1 deletion www/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.1.2

0 comments on commit 81a3b62

Please sign in to comment.