Skip to content

INFRA-92: add commit signing (#13) #10

INFRA-92: add commit signing (#13)

INFRA-92: add commit signing (#13) #10

---
name: Push to main branch
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
check-vars-and-secrets:
name: Check vars and secrets
uses: ./.github/workflows/_check-vars-and-secrets.yml
secrets: inherit
build-and-push-faucet:
name: Build and push faucet image
needs: [check-vars-and-secrets]
runs-on: ubuntu-20.04
steps:
- name: GIT | Checkout Source code
uses: actions/checkout@v4
- name: Call action get-ref-properties
id: get-ref-properties
uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6
- name: Get facuet rc image name
id: get-image-name
env:
ECR_REGISTRY: '${{ vars.ECR_PUBLIC_REGISTRY }}'
APP: faucet
TAG: '${{ steps.get-ref-properties.outputs.sha }}'
shell: bash
run: |
image=${{ env.ECR_REGISTRY }}${{ env.APP }}:${{ env.TAG }}
echo "image=${image}" >> $GITHUB_OUTPUT
- name: Build docker image
run: |
docker build --tag '${{ steps.get-image-name.outputs.image }}' -f ./Dockerfile .
- name: Login to ECR
uses: docker/login-action@v3
with:
registry: ${{ vars.ECR_PUBLIC_HOST }}
username: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }}
- name: Push image to the ECR registry
id: push-image
run: |
docker push '${{ steps.get-image-name.outputs.image }}'