From 412bae8b8ac0cfc7778b5209300296c9539a9bb9 Mon Sep 17 00:00:00 2001 From: Alessandro Thea Date: Fri, 27 Oct 2023 19:10:35 +0200 Subject: [PATCH] Fixing run image workflows --- .../{alma9 copy.yaml => alma9-run.yaml} | 2 +- .github/workflows/c8-run.yaml | 62 +++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) rename .github/workflows/{alma9 copy.yaml => alma9-run.yaml} (97%) create mode 100644 .github/workflows/c8-run.yaml diff --git a/.github/workflows/alma9 copy.yaml b/.github/workflows/alma9-run.yaml similarity index 97% rename from .github/workflows/alma9 copy.yaml rename to .github/workflows/alma9-run.yaml index d278279..c17badb 100644 --- a/.github/workflows/alma9 copy.yaml +++ b/.github/workflows/alma9-run.yaml @@ -51,7 +51,7 @@ jobs: build_dir="${{ github.workspace }}/docker-build" mkdir -p $build_dir cd $build_dir - cp ${{ github.workspace }}/daq-docker/dockerfiles/alma9.dockerfile $build_dir/Dockerfile + cp ${{ github.workspace }}/daq-docker/dockerfiles/alma9-run.dockerfile $build_dir/Dockerfile - name: Build and push Docker images uses: docker/build-push-action@v3 diff --git a/.github/workflows/c8-run.yaml b/.github/workflows/c8-run.yaml new file mode 100644 index 0000000..2993c74 --- /dev/null +++ b/.github/workflows/c8-run.yaml @@ -0,0 +1,62 @@ +name: Build c8-run docker image + +on: + schedule: + - cron: "0 5 * * 2" + + push: + branches: [ develop ] + tags: + - 'v*' + paths: + - dockerfiles/c8-run.dockerfile + + workflow_dispatch: + +jobs: + + push_to_registries: + name: Push Docker image to multiple registries + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Check out the repo + uses: actions/checkout@v3 + with: + repository: DUNE-DAQ/daq-docker + path: daq-docker + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/DUNE-DAQ/c8-run + tags: | + type=raw,value=latest + type=ref,event=branch + type=ref,event=tag + + - name: prepare build dir + run: | + build_dir="${{ github.workspace }}/docker-build" + mkdir -p $build_dir + cd $build_dir + cp ${{ github.workspace }}/daq-docker/dockerfiles/c8-run.dockerfile $build_dir/Dockerfile + + - name: Build and push Docker images + uses: docker/build-push-action@v3 + with: + context: ${{ github.workspace }}/docker-build + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}