Skip to content

Revert my reversion of chore: update hash domain to match core (#30) #24

Revert my reversion of chore: update hash domain to match core (#30)

Revert my reversion of chore: update hash domain to match core (#30) #24

Workflow file for this run

---
name: Build Docker image
'on':
push:
branches:
- main
- master
- 'docker-*'
tags:
- '*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE_NAME: ios-aurora-push
NODE_VERSION: 18
jobs:
build-and-push-image:
runs-on: [self-hosted, linux]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract short git hash
id: vars
run: |
echo sha_short=$(echo $GITHUB_SHA | head -c7) >> $GITHUB_OUTPUT
echo branch_name=$(echo ${GITHUB_REF##*/}) >> $GITHUB_OUTPUT
echo TS=$(date +%s) >> $GITHUB_OUTPUT
- name: Log in to the Container registry
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registries: '072270118115'
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.login-ecr.outputs.registry }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=${{ steps.vars.outputs.branch_name }}-,suffix=-${{ steps.vars.outputs.ts }}
type=ref,event=branch
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup docker context for buildx
id: buildx-context
run: docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
endpoint: builders
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
file: Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64