Skip to content

feat: browser sat

feat: browser sat #1

name: Publish Docker Containers
on:
pull_request:
branches:
- dev
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-websat
jobs:
build_and_publish_docker:
runs-on: ubuntu-latest
outputs:
version: "${{ steps.version.version }}"
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Version
id: version
run: |
VERSION=$(sed "s/a/-a./" <<< $(python setup.py --version))
echo "version=${VERSION}" >> $GITHUB_OUTPUT
env:
image_name: ${{ env.IMAGE_NAME }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for base Docker
id: base_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}},value=${{ steps.version.outputs.version }}
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.websat
push: true
tags: ${{ steps.base_meta.outputs.tags }}
labels: ${{ steps.base_meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7