update workflow to only run jobs on specific commit messages

pull/19/head
lalanza808 11 months ago
parent ae45db9b5b
commit 3c82f29fcb

@ -1,13 +1,17 @@
name: publish images name: Publish images to Docker Hub
on: on:
push: push:
branches: master branches: master
env:
DH_USER: lalanza808
jobs: jobs:
publish_images: publish_images:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Publish Docker images to Dockerhub name: Publish selected Docker image to Dockerhub
if: contains(github.event.head_commit.message, 'release(.*)')
steps: steps:
- name: Authenticate to Dockerhub - name: Authenticate to Dockerhub
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -16,6 +20,15 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build and push Docker images - name: Build and push new nodemapper image
run: | if: contains(github.event.head_commit.message, 'release(nodemapper)')
bash release.sh run: bash release.sh nodemapper
- name: Build and push new monerod image
if: contains(github.event.head_commit.message, 'release(monerod)')
run: bash release.sh monerod
- name: Build and push new exporter image
if: contains(github.event.head_commit.message, 'release(exporter)')
run: bash release.sh exporter

Loading…
Cancel
Save