Skip to content

Use latest tag on main, otherwise Git tag #85

Use latest tag on main, otherwise Git tag

Use latest tag on main, otherwise Git tag #85

Workflow file for this run

---
name: "Build"
on:
push:
branches:
- main
tags:
- '*'
jobs:
build:
name: "Build Docker image and push to Dockerhub"
runs-on: ubuntu-latest
env:
AWS_REGION: us-east-1 # This is the region to authenticate against for public ECR repositories
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: GitHub Tag Name example
env:
TAG: "${{ github.ref_name == 'main' && 'latest' || github.ref_name }}""
run: |
echo "Tag name: $TAG"

Check failure on line 28 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

You have an error in your yaml syntax on line 28
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::118330671040:role/node-indexer-ci
aws-region: ${{ env.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Install prerequisites for Docker build
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build and push Docker images
env:
DOCKER_HUB_KEY: ${{ secrets.DOCKER_HUB_KEY }}
run: |
make image-push