Skip to content

trigger changed

trigger changed #36

name: Publish Docker nightly image
on:
pull_request:
types:
- closed
branches:
- dev
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
if: github.repository == 'OpenHausIO/backend' && github.event.pull_request.merged == true
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
- run: npm run build
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: openhaus/backend
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
tags: openhaus/backend:nightly
labels: ${{ steps.meta.outputs.labels }}