Skip to content

Add debug output for detector configuration variables #44

Add debug output for detector configuration variables

Add debug output for detector configuration variables #44

Workflow file for this run

name: Mirror and Trigger EICweb
on:
delete:
push:
workflow_dispatch:
inputs:
container_name:
description: 'Container name'
required: false
default: 'eic_ci'
type: string
image_tag:
description: 'Container image tag'
required: false
default: 'nightly'
type: string
detector_config:
description: 'Detector configuration'
required: false
default: 'epic_craterlake'
type: string
detector_version:
description: 'Detector version'
required: false
default: 'main'
type: string
concurrency:
group: mirror-${{ github.event_name }}
cancel-in-progress: false
jobs:
build:
name: Mirror and Trigger EICweb
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
statuses: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to EICweb
uses: eic/gitlab-sync@v1
with:
url: https://eicweb.phy.anl.gov/EIC/campaigns/datasets.git
token: ${{ secrets.GITLAB_TOKEN }}
username: ${{ secrets.GITLAB_USERNAME }}
ciskip: true
- name: Trigger EICweb
id: trigger_eicweb
uses: eic/trigger-gitlab-ci@v3
if: ${{ github.event_name != 'delete' }}
with:
url: https://eicweb.phy.anl.gov
project_id: 491
token: ${{ secrets.EICWEB_CAMPAIGNS_DATASETS_TRIGGER }}
ref_name: ${{ github.event.pull_request.head.ref || github.ref }}
variables: |
GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_SHA=${{ github.event.pull_request.head.sha || github.sha }}
GITHUB_PR=${{ github.event.pull_request.number }}
PIPELINE_NAME=${{ github.repository }}: ${{ github.event.pull_request.title || github.ref_name }}
CONTAINER_NAME=${{ inputs.container_name || 'eic_ci' }}
IMAGE_TAG=${{ inputs.image_tag || 'nightly' }}
DETECTOR_CONFIG=${{ inputs.detector_config || 'epic_craterlake' }}
DETECTOR_VERSION=${{ inputs.detector_version || 'main' }}
- name: Set pending EICweb status
if: ${{ github.event_name != 'delete' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DETECTOR_CONFIG: epic_craterlake
COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
REPO: ${{ github.repository }}
PIPELINE_URL: ${{ fromJson(steps.trigger_eicweb.outputs.json).web_url }}
run: |
curl --fail-with-body \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d "{\"context\": \"eicweb/campaigns/datasets (nightly, $DETECTOR_CONFIG)\", \"state\": \"pending\", \"description\": \"Waiting for response from the EICweb\", \"target_url\": \"$PIPELINE_URL\"}" \
"https://api.github.com/repos/$REPO/statuses/$COMMIT_SHA"