Skip to content

Merge pull request #165 from CosmoStat/feature/ellipticity-suffix #68

Merge pull request #165 from CosmoStat/feature/ellipticity-suffix

Merge pull request #165 from CosmoStat/feature/ellipticity-suffix #68

Workflow file for this run

name: Create and publish a Docker image
on:
push:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
BRANCH: ${{ github.ref }}
jobs:
build-and-push-image:
runs-on:
- ubuntu-latest
# - macos-latest
permissions:
contents: read
packages: write
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Test
run: docker run --rm ${{ steps.meta.outputs.tags }} python -c "import sp_validation"
- name: Push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}