forked from flatpak/xdg-desktop-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Create build container | ||
|
||
env: | ||
IMAGE_TAG: 20240908-1 | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
image: | ||
description: "The build image" | ||
value: ${{ jobs.build-container.outputs.image }} | ||
image_options: | ||
description: "The options to use with the image" | ||
value: --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --privileged | ||
|
||
jobs: | ||
build-container: | ||
name: Create build container | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
image: ${{ steps.check.outputs.image }} | ||
|
||
steps: | ||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
|
||
- name: Check if image already exists on GHCR | ||
id: check | ||
run: | | ||
image=ghcr.io/${{ github.repository_owner }}/xdg-desktop-portal-build:${{ env.IMAGE_TAG }} | ||
echo "exists=$(docker manifest inspect $image >/dev/null && echo 'true' || echo 'false')" \ | ||
>> "$GITHUB_OUTPUT" | ||
echo "image=$image" >> "$GITHUB_OUTPUT" | ||
- name: Build and push | ||
if: ${{ steps.check.outputs.exists == 'false' }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
file: .github/workflows/Containerfile | ||
tags: ghcr.io/${{ github.repository_owner }}/xdg-desktop-portal-build:${{ env.IMAGE_TAG }} |
This file contains 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