.github/workflows/build.yml #59
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
on: workflow_dispatch | |
env: | |
LATEST_TAG: ${{ secrets.DOCKERHUB_USERNAME }}/combine2pyhf:latest | |
jobs: | |
combine2pyhf: | |
runs-on: ubuntu-latest | |
name: Build combine2pyhf image | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up cvmfs | |
uses: cvmfs-contrib/github-action-cvmfs@v3 | |
- name: Login to docker hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set up environment | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ env.LATEST_TAG }} | |
- name: Build and push image | |
run: | | |
docker run -v /cvmfs/sft.cern.ch:/cvmfs/sft.cern.ch -v /cvmfs/cvmfs-config.cern.ch:/cvmfs/cvmfs-config.cern.ch ${{ env.LATEST_TAG }} | |
docker commit $(docker ps -aqf "ancestor=${{ env.LATEST_TAG }}") ${{ env.LATEST_TAG }} | |
docker image push ${{ env.LATEST_TAG }} |