File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Dev Container CI
2+
3+ on :
4+ push :
5+ paths :
6+ - ' .github/workflows/osc.yml'
7+ - ' osc/**'
8+ workflow_dispatch :
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout source code
15+ uses : actions/checkout@v3
16+ - name : Setup dev container
17+ if : ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
18+ run : |
19+ npm install --global @devcontainers/cli
20+ - name : Setup container registry credentials
21+ env :
22+ CONTAINER_REGISTRY_NAMESPACE : ${{ secrets.CONTAINER_REGISTRY_NAMESPACE }}
23+ CONTAINER_REGISTRY_USERNAME : ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
24+ CONTAINER_REGISTRY_TOKEN : ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
25+ if : ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
26+ run : |
27+ docker login "$CONTAINER_REGISTRY_NAMESPACE" \
28+ --username "$CONTAINER_REGISTRY_USERNAME" \
29+ --password-stdin <<< "$CONTAINER_REGISTRY_TOKEN"
30+ - name : Build dev container
31+ env :
32+ CONTAINER_REGISTRY_NAMESPACE : ${{ secrets.CONTAINER_REGISTRY_NAMESPACE }}
33+ CONTAINER_REGISTRY_USERNAME : ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
34+ run : |
35+ cd flatpak
36+ devcontainer build \
37+ --workspace-folder . \
38+ --image-name "$CONTAINER_REGISTRY_NAMESPACE/$CONTAINER_REGISTRY_USERNAME/devcontainer-osc:latest"
39+ - name : Push dev container
40+ env :
41+ CONTAINER_REGISTRY_NAMESPACE : ${{ secrets.CONTAINER_REGISTRY_NAMESPACE }}
42+ CONTAINER_REGISTRY_USERNAME : ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
43+ if : ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
44+ run : |
45+ docker image push --all-tags "$CONTAINER_REGISTRY_NAMESPACE/$CONTAINER_REGISTRY_USERNAME/devcontainer-osc"
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
2+
3+ RUN VERSION="$(grep -oP 'VERSION_ID=" \K [^"]+' '/etc/os-release')" && \
4+ curl --location "https://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_$VERSION/Release.key" | sudo gpg --dearmor --output '/etc/apt/keyrings/opensuse-tools.gpg' && \
5+ echo "deb [signed-by=/etc/apt/keyrings/opensuse-tools.gpg] https://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_$VERSION ./" | sudo tee /etc/apt/sources.list.d/opensuse-tools.list
6+ RUN sudo apt update && \
7+ DEBIAN_FRONTEND=noninteractive sudo apt install --assume-yes 'osc' 'obs-service-*' 'libxml2-utils'
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " openSUSE Commander Dev Container" ,
3+ "build" : {
4+ "dockerfile" : " Dockerfile"
5+ },
6+ "privileged" : true
7+ }
You can’t perform that action at this time.
0 commit comments