Skip to content

Commit fc5c017

Browse files
authored
fix: use Containerfiles to build in CI and Release workflows (#770)
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
1 parent 2b7a360 commit fc5c017

File tree

4 files changed

+15
-38
lines changed

4 files changed

+15
-38
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,7 @@ jobs:
5757
- name: Build Image
5858
id: build-image
5959
run: |
60-
podman build -t ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:latest .
61-
podman push ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:latest
60+
podman build -t ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext-builder:next . -f ./build/Containerfile.builder
61+
podman push ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext-builder:next
62+
podman build -t ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:next . -f ./build/Containerfile
63+
podman push ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:next

.github/workflows/pr-check.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,28 +203,25 @@ jobs:
203203
working-directory: ./podman-desktop-sandbox-ext
204204
run: yarn install
205205

206-
- name: Build Sandbox extension from container file
206+
- name: Build Sandbox extension from container file and install SSO dependency
207207
working-directory: ./podman-desktop-sandbox-ext
208208
run: |
209-
yarn build
210-
podman build -t local_sandbox_image ./
209+
podman build -t ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext-builder:next . -f ./build/Containerfile.builder
210+
podman build -t local_sandbox_image ./ -f ./build/Containerfile
211211
CONTAINER_ID=$(podman create localhost/local_sandbox_image --entrypoint "")
212212
mkdir -p tests/playwright/output/sandbox-tests-pd/plugins
213213
podman export $CONTAINER_ID | tar -x -C tests/playwright/output/sandbox-tests-pd/plugins/
214214
mv tests/playwright/output/sandbox-tests-pd/plugins/extension tests/playwright/output/sandbox-tests-pd/plugins/sandbox-extension
215215
podman rm -f $CONTAINER_ID
216216
podman rmi -f localhost/local_sandbox_image:latest
217217
218-
- name: Build SSO extension from container file
219-
working-directory: ./podman-desktop-redhat-account-ext
220-
run: |
221-
pnpm install && pnpm build
222-
podman build -t local_sso_image ./
223-
CONTAINER_ID=$(podman create localhost/local_sso_image --entrypoint "")
218+
# install sso extension
219+
podman pull ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest
220+
CONTAINER_ID=$(podman create ghcr.io/redhat-developer/podman-desktop-redhat-account-ext --entrypoint "")
224221
mkdir -p tests/playwright/output/sandbox-tests-pd/plugins
225222
podman export $CONTAINER_ID | tar -x -C ../podman-desktop-sandbox-ext/tests/playwright/output/sandbox-tests-pd/plugins/
226223
podman rm -f $CONTAINER_ID
227-
podman rmi -f localhost/local_sso_image:latest
224+
podman rmi -f ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest
228225

229226
- name: Delete Electron resources folder before E2E tests
230227
working-directory: ./podman-desktop-sandbox-ext

.github/workflows/release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,12 @@ jobs:
109109

110110
- name: Build Image
111111
id: build-image
112+
112113
run: |
113-
podman build -t ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:${{ needs.tag.outputs.extVersion }} .
114+
podman build -t ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:${{ needs.tag.outputs.extVersion }} . -f ./build/Containerfile
115+
podman tag ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:${{ needs.tag.outputs.extVersion }} ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:latest
114116
podman push ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:${{ needs.tag.outputs.extVersion }}
117+
podman push ghcr.io/${{ github.repository_owner }}/podman-desktop-sandbox-ext:latest
115118
116119
release:
117120
needs: [tag, build]

Containerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)