Skip to content

Commit

Permalink
Merge master & release branch workflow files.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Oct 6, 2023
1 parent 5282259 commit 2b3370b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Continuous Integration

on:
workflow_dispatch:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
branches: [ "master", "v*.*" ]
tags: [ "*.*.*" ]

jobs:
Expand Down Expand Up @@ -38,7 +39,8 @@ jobs:
shell: bash
run: |
if [[ $GITHUB_REF == "refs/tags"* ]]; then
echo "tag=${GITHUB_REF/refs\/tags\//}" | sed "s/^v//" >> $GITHUB_OUTPUT
TAG=$(echo "${GITHUB_REF/refs\/tags\/}" | sed "s/^.*\([0-9].[0-9].[0-9]\).*$/\1/")
echo "tag=$TAG" >> $GITHUB_OUTPUT
else
echo "tag=0" >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -389,7 +391,7 @@ jobs:
path: server

- name: 🔨 Build and push (latest)
if: ${{ github.event_name == 'push' && matrix.network == 'mainnet' }}
if: ${{ github.event_name == 'push' && matrix.network == 'mainnet' && endsWith(github.ref, 'master') }}
uses: docker/build-push-action@v4
with:
build-args: |
Expand All @@ -404,7 +406,7 @@ jobs:
cache-to: type=inline

- name: 🔨 Build and push (latest + network)
if: ${{ github.event_name == 'push' && matrix.target == 'cardano-node-ogmios' }}
if: ${{ github.event_name == 'push' && matrix.target == 'cardano-node-ogmios' && endsWith(github.ref, 'master') }}
uses: docker/build-push-action@v4
with:
build-args: |
Expand Down

0 comments on commit 2b3370b

Please sign in to comment.