Compare commits
1 Commits
main
...
7bcccf5fb3
| Author | SHA1 | Date | |
|---|---|---|---|
|
7bcccf5fb3
|
@@ -17,7 +17,6 @@ jobs:
|
|||||||
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
fedora: ${{ steps.filter.outputs.fedora == 'true' }}
|
||||||
infra: ${{ steps.filter.outputs.infra == 'true' || steps.filter.outputs.fedora == 'true' }}
|
infra: ${{ steps.filter.outputs.infra == 'true' || steps.filter.outputs.fedora == 'true' }}
|
||||||
go: ${{ steps.filter.outputs.go == 'true' || steps.filter.outputs.fedora == 'true' }}
|
go: ${{ steps.filter.outputs.go == 'true' || steps.filter.outputs.fedora == 'true' }}
|
||||||
php: ${{ steps.filter.outputs.php == 'true' || steps.filter.outputs.fedora == 'true' }}
|
|
||||||
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'}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -29,7 +28,6 @@ jobs:
|
|||||||
fedora: ['containers/fedora/**']
|
fedora: ['containers/fedora/**']
|
||||||
infra: ['containers/infra/**']
|
infra: ['containers/infra/**']
|
||||||
go: ['containers/go/**']
|
go: ['containers/go/**']
|
||||||
php: ['containers/php/**']
|
|
||||||
|
|
||||||
base-image:
|
base-image:
|
||||||
needs: [changes]
|
needs: [changes]
|
||||||
@@ -70,14 +68,13 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
container: [infra, go, php]
|
container: [infra, go]
|
||||||
steps:
|
steps:
|
||||||
- name: Check if build needed
|
- name: Check if build needed
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.container }}" == "infra" && "${{ needs.changes.outputs.infra }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
if [[ "${{ matrix.container }}" == "infra" && "${{ needs.changes.outputs.infra }}" == "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 }}" == "go" && "${{ needs.changes.outputs.go }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
|
||||||
if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "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
|
||||||
- name: Clone repo
|
- name: Clone repo
|
||||||
if: steps.check.outputs.run == 'true'
|
if: steps.check.outputs.run == 'true'
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
FROM quay.io/fedora/fedora:43
|
FROM quay.io/fedora/fedora:43
|
||||||
|
|
||||||
# === install system packages ===
|
# === install system packages ===
|
||||||
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
RUN --mount=type=cache,target=/var/cache/dnf \
|
||||||
dnf update -y && \
|
dnf update -y && \
|
||||||
dnf copr enable -y atim/lazygit && \
|
dnf copr enable -y atim/lazygit && \
|
||||||
dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \
|
dnf -y install procps ping bash-completion glibc-langpack-en \
|
||||||
host-spawn dbus-launch \
|
host-spawn dbus-launch \
|
||||||
zoxide git npm neovim awk jq unzip fd-find lazygit
|
zoxide git npm neovim awk jq unzip fd-find lazygit && \
|
||||||
|
dnf clean all
|
||||||
|
|
||||||
# === setup user ===
|
# === setup user ===
|
||||||
RUN useradd -ms /bin/bash user && echo 'user ALL=NOPASSWD: ALL' > /etc/sudoers && mkdir -p /run/user/1000 && chown user:user /run/user/1000
|
RUN useradd -ms /bin/bash user && \
|
||||||
|
echo 'user ALL=NOPASSWD: ALL' > /etc/sudoers
|
||||||
|
|
||||||
USER user
|
USER user
|
||||||
WORKDIR /home/user
|
WORKDIR /home/user
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ ARG TAG
|
|||||||
FROM job79/fedora:${TAG}
|
FROM job79/fedora:${TAG}
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
RUN --mount=type=cache,target=/var/cache/dnf \
|
||||||
dnf -y --setopt=keepcache=1 install go
|
dnf -y install go && dnf clean all
|
||||||
|
|
||||||
USER user
|
USER user
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ ARG TAG
|
|||||||
FROM job79/fedora:${TAG}
|
FROM job79/fedora:${TAG}
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
RUN --mount=type=cache,target=/var/cache/dnf \
|
||||||
dnf -y --setopt=keepcache=1 install kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r '.assets[] | select(.name | test("sops-.*.x86_64.rpm$")) | .browser_download_url')" && \
|
dnf -y install kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r '.assets[] | select(.name | test("sops-.*.x86_64.rpm$")) | .browser_download_url')" && \
|
||||||
|
dnf clean all && \
|
||||||
curl -sL https://talos.dev/install | sh && \
|
curl -sL https://talos.dev/install | sh && \
|
||||||
curl -s https://fluxcd.io/install.sh | bash
|
curl -s https://fluxcd.io/install.sh | bash
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
ARG TAG
|
|
||||||
FROM job79/fedora:${TAG}
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
|
|
||||||
dnf -y --setopt=keepcache=1 install php composer && \
|
|
||||||
composer global require laravel/installer
|
|
||||||
|
|
||||||
USER user
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
arg "-v $HOME/Documents/php:/home/user/Documents/php"
|
|
||||||
Reference in New Issue
Block a user