Add more upstreams #57
This file contains hidden or 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
| name: Build artdaq-spack docker image (self hosted) | |
| on: | |
| schedule: | |
| - cron: "0 0 * * 4" | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| paths: | |
| - dockerfiles/artdaq-spack.dockerfile | |
| workflow_dispatch: | |
| jobs: | |
| push_to_registries: | |
| name: Push Docker image to multiple registries | |
| runs-on: self-hosted | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - name: Test CVMFS | |
| run: | | |
| ls -l /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_areas | |
| - name: Check out the daq-docker repo | |
| uses: actions/checkout@main | |
| with: | |
| repository: art-daq/daq-docker | |
| path: daq-docker | |
| - name: Check out the artdaq repo | |
| uses: actions/checkout@main | |
| with: | |
| repository: art-daq/artdaq | |
| path: artdaq | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@master | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@master | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.TOKEN_GHIO }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@master | |
| with: | |
| images: | | |
| eflumerf/artdaq-spack | |
| ghcr.io/art-daq/artdaq-spack | |
| tags: | | |
| type=raw,value=latest | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| - name: Get artdaq tag | |
| id: artdaqver | |
| run: | | |
| cd ${{ github.workspace }}/artdaq | |
| artdaqver=v`grep "project" CMakeLists.txt|grep -oE "VERSION [^)]*"|awk '{print $2}'|sed 's/\./_/g'` | |
| echo "artdaqver=${artdaqver}" >> $GITHUB_OUTPUT | |
| - name: prepare build dir | |
| run: | | |
| build_dir="${{ github.workspace }}/docker-build" | |
| mkdir -p $build_dir | |
| cd $build_dir | |
| cp ${{ github.workspace }}/daq-docker/dockerfiles/artdaq-spack.dockerfile $build_dir/Dockerfile | |
| rsync --mkpath --progress -ax /cvmfs/fermilab.opensciencegrid.org/products/artdaq/spack_areas/artdaq-${{ steps.artdaqver.outputs.artdaqver }}/ $build_dir/spack_areas/artdaq-${{ steps.artdaqver.outputs.artdaqver }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@master | |
| - name: Build and push Docker images | |
| uses: docker/build-push-action@master | |
| with: | |
| context: ${{ github.workspace }}/docker-build | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: ARTDAQVER=${{ steps.artdaqver.outputs.artdaqver }} | |