Add helper function for reading epoch and effarea #117
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images | |
name: Docker-V2DL3-Eventdisplay | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
branches: ["main"] | |
release: | |
types: [published] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-v2dl3-eventdisplay: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: 'V2DL3' | |
- name: Set build arguments | |
run: | | |
if [[ "${{ github.event_name }}" == 'pull_request' ]]; then | |
echo "BUILD_BRANCH=${GITHUB_HEAD_REF}" >> "$GITHUB_ENV" | |
else | |
echo "BUILD_BRANCH=${GITHUB_REF#refs/heads/}" >> "$GITHUB_ENV" | |
fi | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
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: | |
tags: | | |
type=ref,event=pr,suffix=-v2dl3-eventdisplay | |
type=semver,pattern={{major}}.{{minor}}.{{patch}},suffix=-v2dl3-eventdisplay | |
type=schedule,pattern={{date 'YYYYMMDD'}} | |
type=raw,value={{date 'YYYYMMDD-HHmmss'}} | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
flavor: latest=true | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
build-args: BUILD_BRANCH=${{ env.BUILD_BRANCH }} | |
push: ${{ github.event_name != 'pull_request' }} | |
file: ./V2DL3/utils/v2dl3-eventdisplay-docker/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }}-v2dl3-eventdisplay |