Skip to content

Commit

Permalink
update workflow to only run jobs on specific commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lalanza808 committed Dec 21, 2023
1 parent ae45db9 commit 3c82f29
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: publish images
name: Publish images to Docker Hub

on:
push:
branches: master

env:
DH_USER: lalanza808

jobs:
publish_images:
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:
- name: Authenticate to Dockerhub
uses: docker/login-action@v3
Expand All @@ -16,6 +20,15 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and push Docker images
run: |
bash release.sh
- name: Build and push new nodemapper image
if: contains(github.event.head_commit.message, 'release(nodemapper)')
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



0 comments on commit 3c82f29

Please sign in to comment.