Merge pull request #358 from lsst-dm/tickets/DM-53057 #447
Workflow file for this run
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: Release CI | |
| "on": | |
| push: | |
| tags: | |
| - "*" | |
| pull_request: | |
| # Test changes to build process; code changes are handled by build-service.yml | |
| paths: | |
| - '.github/workflows/ci-release.yaml' | |
| - '.github/actions/**' | |
| - 'Dockerfile' | |
| - 'init-output-run/Dockerfile' | |
| env: | |
| SERVICE_IMAGE_NAME: lsst-dm/prompt-service | |
| INIT_IMAGE_NAME: lsst-dm/prompt-init | |
| INIT_DOCKERDIR: init-output-run | |
| # Base image and tag to run tests against. NOT used in the container build. | |
| BASE_TAG: "latest" | |
| BASE_IMAGE: ghcr.io/${{ github.repository_owner }}/prompt-base | |
| jobs: | |
| # Do testing and building in separate jobs to keep total disk usage down | |
| test: | |
| name: Test service | |
| runs-on: ubuntu-latest | |
| if: > | |
| startsWith(github.ref, 'refs/tags/') | |
| || startsWith(github.head_ref, 'tickets/') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Test service against ${{ env.BASE_IMAGE }}:${{ env.BASE_TAG }}" | |
| uses: ./.github/actions/test-service | |
| with: | |
| baseImage: ${{ env.BASE_IMAGE }} | |
| baseTag: ${{ env.BASE_TAG }} | |
| ghcr_user: ${{ github.actor }} | |
| ghcr_token: ${{ secrets.GITHUB_TOKEN }} | |
| build-service: | |
| name: Build release service image | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: lsst-sqre/build-and-push-to-ghcr@v1 | |
| id: build | |
| with: | |
| image: ${{ env.SERVICE_IMAGE_NAME }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: echo Pushed ghcr.io/${{ github.repository }}:${{ steps.build.outputs.tag }} | |
| build-init: | |
| name: Build release initializer image | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: lsst-sqre/build-and-push-to-ghcr@v1 | |
| id: build | |
| with: | |
| image: ${{ env.INIT_IMAGE_NAME }} | |
| dockerfile: ${{ env.INIT_DOCKERDIR }}/Dockerfile | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: echo Pushed ghcr.io/${{ github.repository }}:${{ steps.build.outputs.tag }} |