Skip to content

Make sure notifications are sent onlyifn the org was in a different s… #101

Make sure notifications are sent onlyifn the org was in a different s…

Make sure notifications are sent onlyifn the org was in a different s… #101

name: Build and push docker image
on:
push:
branches: [ master ]
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: check out code
uses: actions/checkout@v4
-
name: Extract metadata (tags, labels) for Docker
id: metadata
uses: docker/metadata-action@v5
with:
images: supermalang/xaymash-app
labels: |
org.opencontainers.image.title=xaymash-app
org.opencontainers.image.description=Control Portal to easily manage deployments of the Xayma.sh platform
org.opencontainers.image.vendor=XAYMA Labs
tags: |
type=ref,event=branch
type=raw,value={{tag}}
type=raw,value={{branch}}
type=raw,value=latest
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }} # if event is push (alternative to : `push: true`)
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}