|
1 | | -name: Build and Publish Data Processing and EMP Games Docker Images |
| 1 | +name: Build, Test, and Publish the FBPCS Docker Images |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: [ main ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
6 | 8 |
|
7 | 9 | env: |
8 | | - FBPCF_VERSION: 2.1.132 # Please also update line 29 in .github/workflows/docker-publish.yml |
| 10 | + FBPCF_VERSION: 2.1.132 # Please also update line 25 in .github/workflows/docker-publish.yml |
| 11 | + PID_VERSION: 0.0.8 # Please also update line 26 in .github/workflows/docker-publish.yml |
9 | 12 | REGISTRY: ghcr.io |
| 13 | + LOCAL_IMAGE_NAME: fbpcs/onedocker/test |
| 14 | + RC_REGISTRY_URL: ghcr.io/${{ github.repository }}/rc |
| 15 | + RC_REGISTRY_IMAGE_NAME: ghcr.io/${{ github.repository }}/rc/onedocker |
10 | 16 |
|
11 | 17 | jobs: |
12 | 18 | output_version: |
|
18 | 24 | - id: set_version |
19 | 25 | run: echo "version=${{ env.FBPCF_VERSION }}" >> $GITHUB_OUTPUT |
20 | 26 |
|
| 27 | + build_coordinator_image: |
| 28 | + name: Build the Coordinator image |
| 29 | + uses: ./.github/workflows/coordinator-publish.yml |
| 30 | + with: |
| 31 | + new_tag: ${{ github.sha }} |
| 32 | + |
21 | 33 | build_and_publish_data_processing_image: |
22 | 34 | name: Build and Publish Data Processing Image |
23 | 35 | needs: output_version |
|
37 | 49 | tag: latest |
38 | 50 | fbpcf_version: ${{needs.output_version.outputs.fbpcf_version}} |
39 | 51 | push_to_registry: true |
| 52 | + |
| 53 | + build_test_onedocker_image: |
| 54 | + name: Build the bundled test version of the onedocker image |
| 55 | + needs: [build_and_publish_data_processing_image, build_and_publish_emp_games_image] |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v3 |
| 59 | + |
| 60 | + - name: Set up Docker Buildx |
| 61 | + uses: docker/setup-buildx-action@v2 |
| 62 | + |
| 63 | + - name: Log into registry ${{ env.REGISTRY }} |
| 64 | + uses: docker/login-action@v2 |
| 65 | + with: |
| 66 | + registry: ${{ env.REGISTRY }} |
| 67 | + username: ${{ github.actor }} |
| 68 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + |
| 70 | + - name: Build Image |
| 71 | + uses: docker/build-push-action@v3 |
| 72 | + with: |
| 73 | + context: . |
| 74 | + file: docker/onedocker/test/Dockerfile.ubuntu |
| 75 | + tags: | |
| 76 | + ${{ env.RC_REGISTRY_IMAGE_NAME }}:${{ github.sha }} |
| 77 | + build-args: | |
| 78 | + tag=${{ github.sha }} |
| 79 | + os_release=20.04 |
| 80 | + private_id_tag=${{ env.PID_VERSION }} |
| 81 | + repository_url=${{ env.RC_REGISTRY_URL }} |
| 82 | + push: true |
| 83 | + pull: true |
| 84 | + cache-from: type=gha,scope=onedocker-test-${{ github.ref_name }} |
| 85 | + cache-to: type=gha,scope=onedocker-test-${{ github.ref_name }},mode=max |
0 commit comments