|
2 | 2 | workflow_call: |
3 | 3 | outputs: |
4 | 4 | artifact: |
5 | | - description: The name of the uploaded image aretfact. |
| 5 | + description: The name of the uploaded image artefact. |
6 | 6 | value: ${{ jobs.build.outputs.artifact }} |
7 | 7 | version: |
8 | 8 | description: The package's version. |
9 | 9 | value: ${{ jobs.build.outputs.version }} |
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | build: |
13 | | - name: Build snekbox-venv image |
| 13 | + name: Build snekbox-integration image |
14 | 14 | runs-on: ubuntu-latest |
15 | 15 | outputs: |
16 | 16 | artifact: ${{ env.artifact }} |
17 | 17 | version: ${{ steps.version.outputs.version }} |
18 | 18 | env: |
19 | | - artifact: image_artifact_snekbox-venv |
| 19 | + artifact: image_artifact_snekbox-integration |
20 | 20 |
|
21 | 21 | steps: |
22 | 22 | - name: Checkout code |
@@ -81,13 +81,29 @@ jobs: |
81 | 81 | push: false |
82 | 82 | target: venv |
83 | 83 | build-args: DEV=1 |
84 | | - outputs: type=docker,dest=${{ env.artifact }}.tar |
85 | 84 | cache-from: | |
86 | 85 | ${{ steps.cache_config.outputs.cache_from }} |
87 | 86 | ghcr.io/python-discord/snekbox-base:latest |
88 | 87 | ghcr.io/python-discord/snekbox-venv:latest |
89 | 88 | cache-to: ${{ steps.cache_config.outputs.cache_to }} |
90 | | - tags: ghcr.io/python-discord/snekbox-venv:${{ steps.version.outputs.version }} |
| 89 | + tags: snekbox-venv:${{ steps.version.outputs.version }} |
| 90 | + |
| 91 | + - name: Build integration image for testing |
| 92 | + uses: docker/build-push-action@v6 |
| 93 | + with: |
| 94 | + context: . |
| 95 | + file: ./Dockerfile.pydis |
| 96 | + push: false |
| 97 | + pull: false |
| 98 | + outputs: type=docker,dest=${{ env.artifact }}.tar |
| 99 | + build-args: SNEKBOX_IMAGE=snekbox-venv |
| 100 | + build-contexts: | |
| 101 | + snekbox-venv=docker-image://snekbox-venv:${{ steps.version.outputs.version }} |
| 102 | + cache-from: | |
| 103 | + ${{ steps.cache_config.outputs.cache_from }} |
| 104 | + ghcr.io/python-discord/snekbox-venv:latest |
| 105 | + cache-to: ${{ steps.cache_config.outputs.cache_to }} |
| 106 | + tags: ghcr.io/python-discord/snekbox-integration:${{ steps.version.outputs.version }} |
91 | 107 |
|
92 | 108 | # Make the image available as an artifact so other jobs will be able to |
93 | 109 | # download it. |
|
0 commit comments