minor #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Images | |
on: | |
push: | |
branches: | |
- github-runner | |
jobs: | |
build-images: | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
env: | |
DOCKER_HUB_PARACHAIN: kiltprotocol/kilt-node | |
DOCKER_HUB_STANDALONE: kiltprotocol/standalone-node | |
DOCKER_HUB_DIP_PROVIDER_TEMPLATE: kiltprotocol/dip-provider-node-template | |
DOCKER_HUB_DIP_CONSUMER_TEMPLATE: kiltprotocol/dip-consumer-node-template | |
AWS_REGISTRY: ${{ secrets.ECR_REGISTRY }} | |
CI_COMMIT_SHORT_SHA: ${{ github.sha }} | |
CI_COMMIT_BRANCH: ${{ github.ref_name }} | |
CI_COMMIT_TAG: ${{ github.ref_name }} | |
steps: | |
- name: Free Disk Space | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: true | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Display AWS and Docker Versions | |
run: | | |
aws --version | |
docker --version | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to ECR | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ secrets.ECR_REGISTRY }} | |
username: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Build Docker Images | |
run: | | |
./.maintain/build-image.sh build | |
- name: Push Image - Tag | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
./.maintain/push-image.sh build "${{ env.CI_COMMIT_TAG }}" | |
- name: Push Image - Latest | |
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-rc') && !contains(github.ref, 'dev-') | |
run: | | |
./.maintain/push-image.sh build "latest" |