Skip to content

Commit

Permalink
feat: DEVOPS-700 scilla pipelines from jenkins to gha
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlops committed Jun 20, 2023
1 parent f1c48c5 commit 0b43063
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/ci-image-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI - Release

on:
workflow_dispatch:
inputs:
commitOrTag:
description: 'Commit or tag'
required: false
default: ''
push:
tags:

Expand All @@ -11,12 +17,23 @@ jobs:
contents: write
runs-on: docker
steps:
- name: 'Checkout scm'
- name: 'Checkout scm ${{ inputs.commitOrTag }}'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.commitOrTag }}
- name: Check if the commit or tag was passed manually
id: set-tag
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "tag=$(git rev-parse HEAD | cut -c1-8)" >> $GITHUB_OUTPUT
else
echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Check if the tag head is the same as master head
id: check-latest
if: github.event_name == 'workflow_dispatch'
run: |
if test $(git rev-parse origin/master) = $(git rev-parse HEAD); then
echo "latest=true" >> $GITHUB_OUTPUT
Expand All @@ -29,7 +46,7 @@ jobs:
with:
file: docker/Dockerfile
push: true
tag: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/scilla:${{ github.ref_name }}
tag: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/scilla:${{ steps.set-tag.outputs.tag }}
tag-latest: ${{ steps.check-latest.outputs.latest }}
registry: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com
aws-region: ${{ secrets.AWS_REGION_ZILLIQA }}
Expand All @@ -41,7 +58,7 @@ jobs:
with:
file: docker/Dockerfile
push: true
tag: Zilliqa/scilla:${{ github.ref_name }}
tag: Zilliqa/scilla:${{ steps.set-tag.outputs.tag }}
tag-latest: ${{ steps.check-latest.outputs.latest }}
cache-key: ${{ github.event.repository.name }}
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down

0 comments on commit 0b43063

Please sign in to comment.