forked from Job79/devcontainer
Merge branch 'ci-move-to-job-v2'
Some checks failed
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 2m5s
Build containers / dependent-images (dotnet) (push) Failing after 30s
Build containers / dependent-images (php) (push) Successful in 32s
Build containers / dependent-images (rust) (push) Successful in 2m4s
Some checks failed
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 2m5s
Build containers / dependent-images (dotnet) (push) Failing after 30s
Build containers / dependent-images (php) (push) Successful in 32s
Build containers / dependent-images (rust) (push) Successful in 2m4s
This commit is contained in:
111
.gitea/workflows/build.yaml
Normal file
111
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
name: Build containers
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths: ["containers/**", ".gitea/workflows/build.yaml"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
paths: ["containers/**", ".gitea/workflows/build.yaml"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changes:
|
||||||
|
runs-on: job-v2
|
||||||
|
outputs:
|
||||||
|
any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
|
||||||
|
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
||||||
|
php: ${{ steps.filter.outputs.php == 'true' }}
|
||||||
|
rust: ${{ steps.filter.outputs.rust == 'true' }}
|
||||||
|
dotnet: ${{ steps.filter.outputs.dotnet == 'true' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: https://github.com/dorny/paths-filter@v3
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
workflow: ['.gitea/workflows/build.yaml']
|
||||||
|
fedora: ['containers/fedora/**']
|
||||||
|
php: ['containers/php/**']
|
||||||
|
rust: ['containers/rust/**']
|
||||||
|
dotnet: ['containers/dotnet/**']
|
||||||
|
|
||||||
|
base-image:
|
||||||
|
needs: [changes]
|
||||||
|
if: ${{ needs.changes.outputs.fedora == 'true' || needs.changes.outputs.any_change == 'true' }}
|
||||||
|
runs-on: job-v2
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Log in
|
||||||
|
uses: redhat-actions/podman-login@v1
|
||||||
|
with:
|
||||||
|
registry: git.plabble.org
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
- name: Build
|
||||||
|
id: build
|
||||||
|
uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef
|
||||||
|
with:
|
||||||
|
image: maurice/fedora
|
||||||
|
tags: ${{ github.ref_name }}
|
||||||
|
context: ./containers/fedora
|
||||||
|
containerfiles: ./containers/fedora/Containerfile
|
||||||
|
- name: Push
|
||||||
|
uses: redhat-actions/push-to-registry@v2
|
||||||
|
with:
|
||||||
|
image: ${{ steps.build.outputs.image }}
|
||||||
|
tags: ${{ steps.build.outputs.tags }}
|
||||||
|
registry: git.plabble.org
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
extra-args: |
|
||||||
|
--compression-format=zstd
|
||||||
|
--compression-level=12
|
||||||
|
|
||||||
|
dependent-images:
|
||||||
|
needs: [changes, base-image]
|
||||||
|
if: always() && needs.changes.result == 'success' && (needs.base-image.result == 'success' || needs.base-image.result == 'skipped')
|
||||||
|
runs-on: job-v2
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
container: [php, rust, dotnet]
|
||||||
|
steps:
|
||||||
|
- name: Check if build needed
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
|
if [[ "${{ matrix.container }}" == "rust" && "${{ needs.changes.outputs.rust }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
|
if [[ "${{ matrix.container }}" == "dotnet" && "${{ needs.changes.outputs.dotnet }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
|
if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
|
- name: Clone repo
|
||||||
|
if: steps.check.outputs.run == 'true'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Log in
|
||||||
|
if: steps.check.outputs.run == 'true'
|
||||||
|
uses: redhat-actions/podman-login@v1
|
||||||
|
with:
|
||||||
|
registry: git.plabble.org
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
- name: Build
|
||||||
|
id: build
|
||||||
|
if: steps.check.outputs.run == 'true'
|
||||||
|
uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef
|
||||||
|
with:
|
||||||
|
image: maurice/${{ matrix.container }}
|
||||||
|
tags: ${{ github.ref_name }}
|
||||||
|
context: ./containers/${{ matrix.container }}
|
||||||
|
containerfiles: ./containers/${{ matrix.container }}/Containerfile
|
||||||
|
build-args: TAG=${{ github.ref_name }}
|
||||||
|
- name: Push
|
||||||
|
if: steps.check.outputs.run == 'true'
|
||||||
|
uses: redhat-actions/push-to-registry@v2
|
||||||
|
with:
|
||||||
|
image: ${{ steps.build.outputs.image }}
|
||||||
|
tags: ${{ steps.build.outputs.tags }}
|
||||||
|
registry: git.plabble.org
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
extra-args: |
|
||||||
|
--compression-format=zstd
|
||||||
|
--compression-level=12
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
name: Build container
|
|
||||||
on:
|
|
||||||
workflow_dispatch: # This makes the workflow manually triggered
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
paths:
|
|
||||||
- "containers/fedora/**"
|
|
||||||
- "containers/dotnet/**"
|
|
||||||
- "containers/rust/**"
|
|
||||||
- "containers/php/**"
|
|
||||||
- ".gitea/workflows/fedora.yaml"
|
|
||||||
pull_request:
|
|
||||||
branches: ["main"]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
fedora-build:
|
|
||||||
runs-on: job-v2
|
|
||||||
steps:
|
|
||||||
- name: Clone repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Setup Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Login to Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: git.plabble.org
|
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Fedora container
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./containers/fedora
|
|
||||||
file: ./containers/fedora/Containerfile
|
|
||||||
push: true
|
|
||||||
tags: git.plabble.org/maurice/fedora:${{ github.ref_name }}
|
|
||||||
build-args: TAG=${{ github.ref_name }}
|
|
||||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
|
||||||
|
|
||||||
- name: Build and push Rust container
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./containers/rust
|
|
||||||
file: ./containers/rust/Containerfile
|
|
||||||
push: true
|
|
||||||
tags: git.plabble.org/maurice/rust:${{ github.ref_name }}
|
|
||||||
build-args: TAG=${{ github.ref_name }}
|
|
||||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
|
||||||
|
|
||||||
- name: Build and push PHP container
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./containers/php
|
|
||||||
file: ./containers/php/Containerfile
|
|
||||||
push: true
|
|
||||||
tags: git.plabble.org/maurice/php:${{ github.ref_name }}
|
|
||||||
build-args: TAG=${{ github.ref_name }}
|
|
||||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
|
||||||
|
|
||||||
- name: Build and push C# container
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./containers/dotnet
|
|
||||||
file: ./containers/dotnet/Containerfile
|
|
||||||
push: true
|
|
||||||
tags: git.plabble.org/maurice/dotnet:${{ github.ref_name }}
|
|
||||||
build-args: TAG=${{ github.ref_name }}
|
|
||||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
|
||||||
@@ -1,48 +1,40 @@
|
|||||||
name: Build optional dev containers
|
name: Build optional dev containers
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: # This makes the workflow manually triggered
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fedora-build:
|
fedora-build:
|
||||||
runs-on: job-v2
|
runs-on: job-v2
|
||||||
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
container: [rider, android]
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Setup Docker Buildx
|
- name: Log in
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: redhat-actions/podman-login@v1
|
||||||
- name: Login to Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
with:
|
||||||
registry: git.plabble.org
|
registry: git.plabble.org
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
- name: Build ${{ matrix.container }} container
|
||||||
- name: Build and push Rider container
|
id: build_image
|
||||||
uses: docker/build-push-action@v5
|
uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef
|
||||||
with:
|
with:
|
||||||
context: ./containers/rider
|
image: maurice/${{ matrix.container }}
|
||||||
file: ./containers/rider/Containerfile
|
tags: ${{ github.ref_name }}
|
||||||
push: true
|
context: ./containers/${{ matrix.container }}
|
||||||
tags: git.plabble.org/maurice/rider:${{ github.ref_name }}
|
containerfiles: ./containers/${{ matrix.container }}/Containerfile
|
||||||
build-args: TAG=${{ github.ref_name }}
|
build-args: TAG=${{ github.ref_name }}
|
||||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
- name: Push ${{ matrix.container }} container
|
||||||
|
uses: redhat-actions/push-to-registry@v2
|
||||||
- name: Build and push Android Studio container
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
with:
|
||||||
context: ./containers/android
|
image: ${{ steps.build_image.outputs.image }}
|
||||||
file: ./containers/android/Containerfile
|
tags: ${{ steps.build_image.outputs.tags }}
|
||||||
push: true
|
registry: git.plabble.org
|
||||||
tags: git.plabble.org/maurice/android:${{ github.ref_name }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
build-args: TAG=${{ github.ref_name }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
extra-args: |
|
||||||
|
--compression-format=zstd
|
||||||
# - name: Build and push Flutter container
|
--compression-level=12
|
||||||
# uses: docker/build-push-action@v5
|
|
||||||
# with:
|
|
||||||
# context: ./containers/flutter
|
|
||||||
# file: ./containers/flutter/Containerfile
|
|
||||||
# push: true
|
|
||||||
# tags: git.plabble.org/maurice/flutter:${{ github.ref_name }}
|
|
||||||
# build-args: TAG=${{ github.ref_name }}
|
|
||||||
# outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ ARG studio_version="2025.1.4.8"
|
|||||||
ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz"
|
ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz"
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU
|
|
||||||
|
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
||||||
|
dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU
|
||||||
USER user
|
USER user
|
||||||
|
|
||||||
RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \
|
RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \
|
||||||
@@ -15,4 +17,4 @@ RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \
|
|||||||
|
|
||||||
RUN echo 'alias studio="$HOME/AndroidStudio/bin/studio"' >> /home/user/.bashrc
|
RUN echo 'alias studio="$HOME/AndroidStudio/bin/studio"' >> /home/user/.bashrc
|
||||||
RUN echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> /home/user/.bashrc
|
RUN echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> /home/user/.bashrc
|
||||||
RUN echo 'export PATH="$ANDROID_HOME/platform-tools:$PATH"' >> /home/user/.bashrc
|
RUN echo 'export PATH="$ANDROID_HOME/platform-tools:$PATH"' >> /home/user/.bashrc
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
FROM git.plabble.org/maurice/fedora:main
|
FROM git.plabble.org/maurice/fedora:main
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN dnf -y install dotnet-sdk-9.0 dotnet-sdk-10.0
|
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
||||||
|
dnf -y --setopt=keepcache=1 install dotnet-sdk-9.0 dotnet-sdk-10.0
|
||||||
|
|
||||||
COPY install-roslyn.sh /tmp/install-roslyn.sh
|
COPY install-roslyn.sh /tmp/install-roslyn.sh
|
||||||
RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh
|
RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh
|
||||||
|
|
||||||
USER user
|
USER user
|
||||||
RUN dotnet tool install --global dotnet-ef
|
RUN dotnet tool install --global dotnet-ef
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
FROM quay.io/fedora/fedora:43
|
FROM quay.io/fedora/fedora:43
|
||||||
|
|
||||||
# === install system packages ===
|
# === install system packages ===
|
||||||
RUN dnf update -y && \
|
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
||||||
dnf -y install procps ping bash-completion glibc-langpack-en \
|
dnf update -y && \
|
||||||
|
dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \
|
||||||
host-spawn dbus-launch \
|
host-spawn dbus-launch \
|
||||||
git pnpm helix zip
|
git pnpm helix zip
|
||||||
|
|
||||||
# === setup user ===
|
# === setup user ===
|
||||||
RUN useradd -ms /bin/bash user && \
|
RUN useradd -ms /bin/bash user && \
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ ARG rider_version="2025.3.0.3"
|
|||||||
ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz"
|
ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz"
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel
|
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
||||||
|
dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel
|
||||||
USER user
|
USER user
|
||||||
|
|
||||||
RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \
|
RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \
|
||||||
@@ -12,4 +13,4 @@ RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \
|
|||||||
rm /tmp/rider.tar.gz && \
|
rm /tmp/rider.tar.gz && \
|
||||||
mv /home/user/Rider/JetBrains*/* /home/user/Rider
|
mv /home/user/Rider/JetBrains*/* /home/user/Rider
|
||||||
|
|
||||||
RUN echo 'alias rider="$HOME/Rider/bin/rider"' >> /home/user/.bashrc
|
RUN echo 'alias rider="$HOME/Rider/bin/rider"' >> /home/user/.bashrc
|
||||||
|
|||||||
Reference in New Issue
Block a user