Skip to content

Merge pull request #214 from splitio/dependabot/github_actions/develo… #335

Merge pull request #214 from splitio/dependabot/github_actions/develo…

Merge pull request #214 from splitio/dependabot/github_actions/develo… #335

Workflow file for this run

name: unstable
on:
push:
branches-ignore:
- main
permissions:
contents: read
id-token: write
jobs:
push-docker-image:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_RO_TOKEN }}
- name: Configure AWS credentials
if: ${{ github.event_name == 'push' }}
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ vars.ECR_TESTING_ROLE_ARN }}
aws-region: us-east-1
- name: Login to Amazon ECR
if: ${{ github.event_name == 'push' }}
uses: aws-actions/amazon-ecr-login@v2
- name: Checkout code
uses: actions/checkout@v5
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: amd64,arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get short hash
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Docker Build
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ vars.ECR_TESTING_URL }}/${{ github.event.repository.name }}:${{ env.SHORT_SHA }}