Skip to content

Refactor media_badges component in #86

Refactor media_badges component in

Refactor media_badges component in #86

# This action currently only handles building and pushing the container image to the registry.
#
# We will expand it in the future to also handle deployments for our Atlos-native infrastructure.
name: Build and deploy
on:
push:
branches:
- main
- deployments/gap
- deployments/platform
paths:
- "platform/**"
- ".github/workflows/build-and-deploy.yml"
release:
types: [published]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: "ubuntu-latest"
permissions:
contents: read
packages: write
defaults:
run:
working-directory: ./platform
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push container image to registry
uses: docker/build-push-action@v3
with:
push: true
context: ./platform
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./platform/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: APP_REVISION=${{ github.sha }}