Skip to content

style: improve login responsiveness #6

style: improve login responsiveness

style: improve login responsiveness #6

name: Build and push Docker image for staging environment
permissions:
contents: read
on:
workflow_dispatch:
push:
branches:
- staging
jobs:
docker-build-push-dev:
runs-on: ubuntu-latest
environment: STAGING_ENVIRONMENT
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set Short SHA
run: echo "SHORT_SHA=$(git rev-parse --short=7 $GITHUB_SHA)" >> $GITHUB_ENV
- name: echo Short SHA
run: echo $SHORT_SHA
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL}}
username: ${{ secrets.EO_PROJ_STAGING_DOCKER_USERNAME }}
password: ${{ secrets.EO_PROJ_STAGING_DOCKER_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image under tag ${{ env.SHORT_SHA }}
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
cache-from: type=registry,ref=${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL }}/stac-landing:cache
cache-to: type=registry,ref=${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL }}/stac-landing:cache,mode=max
push: true
tags: ${{ secrets.EO_PROJ_STAGING_DOCKER_REGISTRY_URL }}/stac-landing:${{ env.SHORT_SHA }}