Skip to content

Commit

Permalink
feat: added release build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Kammerlo committed May 7, 2024
1 parent e6560e4 commit a054319
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Main branch
name: Build main branch

on:
push:
branches: [ main, feat/RA-64-Containerisation-for-Distribution ]
branches: [ main ]

jobs:
build:
Expand All @@ -16,15 +16,22 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
- name: [API] Build and push Docker image
uses: docker/build-push-action@v4
with:
file: ./api/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-api:main
push: true
- name: Build and push Docker image
- name: [Indexer] Build and push Docker image
uses: docker/build-push-action@v4
with:
file: ./yaci-indexer/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-indexer:main
push: true
push: true
# TODO will be added when the all-in-one image is ready
# - name: [All-in-one] Build and push Docker image
# uses: docker/build-push-action@v4
# with:
# file: ./Dockerfile
# tags: cardanofoundation/cardano-rosetta-java:main
# push: true
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build release

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
ref: ${{github.event.release.tag_name}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: [API] Build and push Docker image
uses: docker/build-push-action@v4
with:
file: ./api/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-api:${{github.event.release.tag_name}},cardanofoundation/cardano-rosetta-java-api:latest
push: true
- name: [Indexer] Build and push Docker image
uses: docker/build-push-action@v4
with:
file: ./yaci-indexer/Dockerfile
tags: cardanofoundation/cardano-rosetta-java-indexer:${{github.event.release.tag_name}},cardanofoundation/cardano-rosetta-java-indexer:latest
push: true
# TODO will be added when the all-in-one image is ready
# - name: [All-in-one] Build and push Docker image
# uses: docker/build-push-action@v4
# with:
# file: ./Dockerfile
# tags: cardanofoundation/cardano-rosetta-java:${{github.event.release.tag_name}}
# push: true

0 comments on commit a054319

Please sign in to comment.