Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Fix prod and dev container after recent updates to pyproject.toml #69

Fix prod and dev container after recent updates to pyproject.toml

Fix prod and dev container after recent updates to pyproject.toml #69

Workflow file for this run

# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
name: docker-simtools
on:
workflow_dispatch:
push:
tags:
- 'v*'
pull_request:
branches: ["main"]
release:
types: [published]
schedule:
- cron: '0 0 * * 0' # Every Sunday at 00:00 UTC
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
corsikasimtelpackage:
runs-on: ubuntu-latest
steps:
- name: download corsikasimtelpackage
run: |
wget --no-verbose https://syncandshare.desy.de/index.php/s/${{ secrets.CLOUD_SIMTEL }}/download
mv download corsika7.7_simtelarray.tar.gz
- name: Publish Artifact
uses: actions/upload-artifact@v3
with:
name: corsika7.7_simtelarray.tar.gz
path: corsika7.7_simtelarray.tar.gz
retention-days: 1
build-simtools-container:
needs: corsikasimtelpackage
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
type: ['dev', 'prod', 'simtelarray']
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: corsika7.7_simtelarray.tar.gz
path: corsika7.7_simtelarray.tar.gz
- name: Checkout repository
uses: actions/checkout@v3
with:
path: 'containers'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container 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@v4
with:
tags: |
type=ref,event=pr
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=schedule,pattern={{date 'YYYYMMDD'}}
type=raw,value={{date 'YYYYMMDD-HHmmss'}}
images: ${{ env.REGISTRY }}/gammasim/simtools-${{ matrix.type }}
flavor: latest=true
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64/v8
push:
${{ github.event_name == 'pull_request' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
file: ./containers/${{ matrix.type }}/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-${{ matrix.type }}