forked from Job79/devcontainer
Compare commits
10 Commits
ea482aa61f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21cbf0d212 | ||
|
|
0f0842c9b4 | ||
|
|
ba73361a8f | ||
|
|
3cdacc7eb8 | ||
|
|
911855d95c | ||
|
|
c49270c7cf | ||
|
|
c618572a18 | ||
|
|
ae8a5ec260 | ||
|
314e269881
|
|||
|
b012abc3ed
|
@@ -14,7 +14,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
|
any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
|
||||||
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
||||||
php: ${{ steps.filter.outputs.php == 'true' }}
|
go: ${{ steps.filter.outputs.go == 'true' }}
|
||||||
rust: ${{ steps.filter.outputs.rust == 'true' }}
|
rust: ${{ steps.filter.outputs.rust == 'true' }}
|
||||||
dotnet: ${{ steps.filter.outputs.dotnet == 'true' }}
|
dotnet: ${{ steps.filter.outputs.dotnet == 'true' }}
|
||||||
steps:
|
steps:
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
filters: |
|
filters: |
|
||||||
workflow: ['.gitea/workflows/build.yaml']
|
workflow: ['.gitea/workflows/build.yaml']
|
||||||
fedora: ['containers/fedora/**']
|
fedora: ['containers/fedora/**']
|
||||||
php: ['containers/php/**']
|
go: ['containers/go/**']
|
||||||
rust: ['containers/rust/**']
|
rust: ['containers/rust/**']
|
||||||
dotnet: ['containers/dotnet/**']
|
dotnet: ['containers/dotnet/**']
|
||||||
|
|
||||||
@@ -68,61 +68,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
container: [php, rust, dotnet]
|
container: [rust, dotnet, go]
|
||||||
steps:
|
steps:
|
||||||
- name: Check if build needed
|
- name: Check if build needed
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
if [[ "${{ matrix.container }}" == "go" && "${{ needs.changes.outputs.go }}" == "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
|
|
||||||
|
|
||||||
manual-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 }}" == "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 [[ "${{ 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
|
if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
matrix:
|
matrix:
|
||||||
container: [rider, android]
|
container: [rider]
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
version="v1.39.15-beta.60"
|
version="v1.39.15"
|
||||||
arch="linux-x64"
|
arch="linux-x64"
|
||||||
link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz"
|
link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz"
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
|||||||
dnf update -y && \
|
dnf update -y && \
|
||||||
dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \
|
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 rsync
|
||||||
|
|
||||||
# === setup user ===
|
# === setup user ===
|
||||||
RUN useradd -ms /bin/bash user && \
|
RUN useradd -ms /bin/bash user && \
|
||||||
|
|||||||
7
containers/go/Containerfile
Normal file
7
containers/go/Containerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM git.plabble.org/maurice/fedora:main
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
||||||
|
dnf -y --setopt=keepcache=1 install go
|
||||||
|
|
||||||
|
USER user
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
FROM git.plabble.org/maurice/fedora:main
|
|
||||||
ARG php_version="8.5"
|
|
||||||
|
|
||||||
RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/${php_version})"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
arg "--cap-add=NET_BIND_SERVICE -p 80:80"
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM git.plabble.org/maurice/dotnet:main
|
FROM git.plabble.org/maurice/dotnet:main
|
||||||
ARG rider_version="2025.3.0.3"
|
ARG rider_version="2025.3.2"
|
||||||
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
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
FROM git.plabble.org/maurice/fedora:main
|
FROM git.plabble.org/maurice/fedora:main
|
||||||
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer
|
RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer
|
||||||
|
|
||||||
|
# Raspberry Pi Pico tools
|
||||||
|
RUN sudo dnf install -y \
|
||||||
|
systemd-devel \
|
||||||
|
pkg-config \
|
||||||
|
&& dnf clean all
|
||||||
|
RUN . "$HOME/.cargo/env" && cargo install elf2uf2-rs --locked
|
||||||
|
RUN . "$HOME/.cargo/env" && rustup target add thumbv6m-none-eabi
|
||||||
|
|||||||
Reference in New Issue
Block a user