Build connectivityserver docker image #3
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
name: Build connectivityserver docker image | |
on: | |
schedule: | |
- cron: "0 5 * * 2" | |
push: | |
branches: [ develop ] | |
tags: | |
- 'v*' | |
paths: | |
- deploy/Dockerfile | |
workflow_dispatch: | |
jobs: | |
push_to_registries: | |
name: Build Docker image and push to github registries | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
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/microsocks | |
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 | |
ls -la ${{ github.workspace }} | |
cp ${{ github.workspace }}/connectivtyservice/deploy/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 }} |