Skip to content

feat: DEVOPS-700 scilla pipelines from jenkins to gha #17

feat: DEVOPS-700 scilla pipelines from jenkins to gha

feat: DEVOPS-700 scilla pipelines from jenkins to gha #17

Workflow file for this run

name: CI - Development
on:
workflow_dispatch:
inputs:
commitOrTag:
description: 'Commit or tag'
required: false
default: ''
push:
branches-ignore:
- 'release/**'
jobs:
push-to-ecr:
permissions:
id-token: write
contents: write
name: build
runs-on: docker
steps:
- name: Clean environment
# Prune the Docker resources created over 10 days before the current execution (change the value for a more/less aggressive cleanup).
shell: bash
run: |
docker system df
docker system prune -a -f --filter "until=168h"
docker system df
- name: 'Checkout scm ${{ inputs.commitOrTag }}'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.commitOrTag }}
- name: Configure AWS Credentials
uses: Zilliqa/gh-actions-workflows/actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.ECR_DEPLOYER_ROLE }}
oidc-role: ${{ secrets.OIDC_ROLE }}
aws-region: ${{ secrets.AWS_REGION_ZILLIQA }}
- name: Login to the registry
uses: docker/login-action@v2
with:
registry: ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com
- name: Image tag
id: set-tag
run: echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
shell: bash
- name: Build Docker images
run: DOCKER_BUILDKIT=1 docker build -t ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/scilla:${{ steps.set-tag.outputs.tag }} -f docker/Dockerfile .
shell: bash
- name: Push Docker images
run: docker push ${{ secrets.AWS_ACCOUNT_ID_ZILLIQA }}.dkr.ecr.${{ secrets.AWS_REGION_ZILLIQA }}.amazonaws.com/scilla:${{ steps.set-tag.outputs.tag }}
shell: bash