adding IREF, VREF, and CINJ db pulls to simplified mode #242
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: Continuous Integration Docker | |
| on: | |
| pull_request: | |
| branches: | |
| - DEV | |
| workflow_dispatch: | |
| inputs: | |
| image_name: | |
| description: 'Name of Docker image' | |
| required: false | |
| jobs: | |
| build-image: | |
| name: Build Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 # Important! Needed to preserve .git directory | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.OSU_PIXELS_DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.OSU_PIXELS_DOCKERHUB_PASSWORD }} | |
| - name: Docker Login to GitLab Registry | |
| run: | | |
| docker login -u '${{ secrets.DOCKER_LOGIN_USERNAME}}' -p '${{ secrets.DOCKER_LOGIN_PASSWORD }}' gitlab-registry.cern.ch | |
| - name: Repo name | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| echo "BRANCH_NAME"=$(echo "${{github.event.pull_request.title }}" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-') >> $GITHUB_ENV | |
| elif [[ -z "${{ github.event.inputs.image_name }}" ]]; then | |
| echo "BRANCH_NAME"=$(echo "${{ github.event.head_ref }}" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-') >> $GITHUB_ENV | |
| else | |
| echo "BRANCH_NAME"=$(echo "${{ github.event.inputs.image_name }}" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-') >> $GITHUB_ENV | |
| fi | |
| - name: Docker build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: osupixels/ph2_acf_gui_dev:${{ env.BRANCH_NAME }} | |
| build-args: | | |
| BUILDKIT_CONTEXT_KEEP_GIT_DIR=true |