From 293ea1c9ded44734de01f58a6b36c58bb0b8135f Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:06:18 +0000 Subject: [PATCH 1/8] Initial release --- .github/workflows/BuildImage.yml | 6 ++-- .github/workflows/permissions.yml | 1 + Dockerfile | 34 +++++++++++++++++-- Dockerfile.complex | 23 ------------- README.md | 28 ++------------- root/etc/cont-init.d/95-apt-get | 5 --- root/etc/cont-init.d/98-vpn-config | 26 -------------- .../run | 30 ---------------- .../type | 1 - .../init-mod-imagename-modname-add-package/up | 1 - .../init-mod-imagename-modname-install/type | 1 - .../init-mod-imagename-modname-install/up | 1 - .../dependencies.d/init-mods | 0 .../run | 11 ++++++ .../type | 1 + .../up | 1 + .../dependencies.d/init-mods-package-install | 0 .../run | 4 +-- .../type | 1 + .../up | 1 + ...nit-mod-sabnzbd-par2cmdline-turbo-install} | 0 ...mod-sabnzbd-par2cmdline-turbo-add-package} | 0 .../s6-rc.d/svc-mod-imagename-modname/run | 7 ---- .../s6-rc.d/svc-mod-imagename-modname/type | 1 - .../init-mod-imagename-modname-install | 0 ...mod-sabnzbd-par2cmdline-turbo-add-package} | 0 ...nit-mod-sabnzbd-par2cmdline-turbo-install} | 0 .../user/contents.d/svc-mod-imagename-modname | 0 root/etc/services.d/sshvpn/run | 3 -- 29 files changed, 54 insertions(+), 133 deletions(-) delete mode 100644 Dockerfile.complex delete mode 100644 root/etc/cont-init.d/95-apt-get delete mode 100644 root/etc/cont-init.d/98-vpn-config delete mode 100755 root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run delete mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/type delete mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up delete mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type delete mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/up rename root/etc/s6-overlay/s6-rc.d/{init-mod-imagename-modname-add-package => init-mod-sabnzbd-par2cmdline-turbo-add-package}/dependencies.d/init-mods (100%) create mode 100755 root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/run create mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/type create mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/up rename root/etc/s6-overlay/s6-rc.d/{init-mod-imagename-modname-install => init-mod-sabnzbd-par2cmdline-turbo-install}/dependencies.d/init-mods-package-install (100%) rename root/etc/s6-overlay/s6-rc.d/{init-mod-imagename-modname-install => init-mod-sabnzbd-par2cmdline-turbo-install}/run (76%) create mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/type create mode 100644 root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/up rename root/etc/s6-overlay/s6-rc.d/init-mods-end/dependencies.d/{init-mod-imagename-modname-install => init-mod-sabnzbd-par2cmdline-turbo-install} (100%) rename root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/{init-mod-imagename-modname-add-package => init-mod-sabnzbd-par2cmdline-turbo-add-package} (100%) delete mode 100755 root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/run delete mode 100644 root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/type delete mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-imagename-modname-install rename root/etc/s6-overlay/s6-rc.d/{svc-mod-imagename-modname/dependencies.d/init-services => user/contents.d/init-mod-sabnzbd-par2cmdline-turbo-add-package} (100%) rename root/etc/s6-overlay/s6-rc.d/user/contents.d/{init-mod-imagename-modname-add-package => init-mod-sabnzbd-par2cmdline-turbo-install} (100%) delete mode 100644 root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-mod-imagename-modname delete mode 100755 root/etc/services.d/sshvpn/run diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 518b0d8..44da459 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -4,14 +4,14 @@ on: [push, pull_request, workflow_dispatch] env: ENDPOINT: "linuxserver/mods" #don't modify - BASEIMAGE: "replace_baseimage" #replace - MODNAME: "replace_modname" #replace + BASEIMAGE: "sabnzbd" #replace + MODNAME: "par2cmdline-turbo" #replace jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 + - uses: actions/checkout@${{ vars.CHECKOUT_VERSION }} - name: Build image run: | diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml index 2df6b61..7cf4f66 100644 --- a/.github/workflows/permissions.yml +++ b/.github/workflows/permissions.yml @@ -4,6 +4,7 @@ on: paths: - '**/run' - '**/finish' + - '**/check' jobs: permission_check: uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1 diff --git a/Dockerfile b/Dockerfile index 4ece5e8..1deebb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,34 @@ -FROM scratch +## Buildstage ## +FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage -LABEL maintainer="username" +RUN \ + echo "**** install packages ****" && \ + apk add -U --update --no-cache --virtual=build-dependencies \ + autoconf \ + automake \ + build-base && \ + echo "**** install par2cmdline-turbo from source ****" && \ + mkdir /tmp/par2cmdline && \ + curl -o \ + /tmp/par2cmdline.tar.gz -L \ + "https://github.com/animetosho/par2cmdline-turbo/archive/refs/heads/turbo.tar.gz" && \ + tar xf \ + /tmp/par2cmdline.tar.gz -C \ + /tmp/par2cmdline --strip-components=1 && \ + cd /tmp/par2cmdline && \ + ./automake.sh && \ + ./configure && \ + make && \ + make check && \ + make install DESTDIR=/root-layer # copy local files -COPY root/ / +COPY root/ /root-layer/ + +## Single layer deployed image ## +FROM scratch + +LABEL maintainer="thespad" + +# Add files from buildstage +COPY --from=buildstage /root-layer/ / diff --git a/Dockerfile.complex b/Dockerfile.complex deleted file mode 100644 index d2c6b11..0000000 --- a/Dockerfile.complex +++ /dev/null @@ -1,23 +0,0 @@ -## Buildstage ## -FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as buildstage - -RUN \ - echo "**** install packages ****" && \ - apk add --no-cache \ - curl && \ - echo "**** grab rclone ****" && \ - mkdir -p /root-layer && \ - curl -o \ - /root-layer/rclone.deb -L \ - "https://downloads.rclone.org/v1.47.0/rclone-v1.47.0-linux-amd64.deb" - -# copy local files -COPY root/ /root-layer/ - -## Single layer deployed image ## -FROM scratch - -LABEL maintainer="username" - -# Add files from buildstage -COPY --from=buildstage /root-layer/ / diff --git a/README.md b/README.md index e2c84a5..88ef217 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,3 @@ -# Rsync - Docker mod for openssh-server +# par2cmdline-turbo - SABnzbd mod -This mod adds rsync to openssh-server, to be installed/updated during container start. - -In openssh-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:openssh-server-rsync` - -If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:openssh-server-rsync|linuxserver/mods:openssh-server-mod2` - -# Mod creation instructions - -* Fork the repo, create a new branch based on the branch `template`. -* Edit the `Dockerfile` for the mod. `Dockerfile.complex` is only an example and included for reference; it should be deleted when done. -* Inspect the `root` folder contents. Edit, add and remove as necessary. -* The mod should be compatible with both s6v2 and s6v3 (until s6v2 based baseimages are deprecated). -* After all init scripts and services are created, run `find ./ -name run -exec chmod +x {} +; find ./ -name finish -exec chmod +x {} +` to fix permissions. -* Edit this readme with pertinent info, delete these instructions. -* Finally edit the `.github/workflows/BuildImage.yml`. Customize the build branch, and the vars for `BASEIMAGE` and `MODNAME`. -* Ask the team to create a new branch named `-`. Baseimage should be the name of the image the mod will be applied to. The new branch will be based on the `template` branch. -* Submit PR against the branch created by the team. - - -## Tips and tricks - -* To decrease startup times when multiple mods are used, we have consolidated `apt-get update` down to one file. As seen in the [nodejs mod](https://github.com/linuxserver/docker-mods/tree/code-server-nodejs/root/etc/cont-init.d) -* Some images has helpers built in, these images are currently: - * [Openvscode-server](https://github.com/linuxserver/docker-openvscode-server/pull/10/files) - * [Code-server](https://github.com/linuxserver/docker-code-server/pull/95) +This mod adds the [par2cmdline-turbo](https://github.com/animetosho/par2cmdline-turbo) fork as a replacement for the standard par2cmdline package. diff --git a/root/etc/cont-init.d/95-apt-get b/root/etc/cont-init.d/95-apt-get deleted file mode 100644 index 8e5fe66..0000000 --- a/root/etc/cont-init.d/95-apt-get +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/with-contenv bash - -if [ -f /usr/bin/apt ]; then - apt-get update -fi diff --git a/root/etc/cont-init.d/98-vpn-config b/root/etc/cont-init.d/98-vpn-config deleted file mode 100644 index 98f2770..0000000 --- a/root/etc/cont-init.d/98-vpn-config +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/with-contenv bash - -# Determine if setup is needed -if [ ! -f /usr/local/lib/python***/dist-packages/sshuttle ] && \ -[ -f /usr/bin/apt ]; then - ## Ubuntu - apt-get install --no-install-recommends -y \ - iptables \ - openssh-client \ - python3 \ - python3-pip - pip3 install sshuttle -fi -if [ ! -f /usr/lib/python***/site-packages/sshuttle ] && \ -[ -f /sbin/apk ]; then - # Alpine - apk add --no-cache \ - iptables \ - openssh \ - py3-pip \ - python3 - pip3 install sshuttle -fi - -chown -R root:root /root -chmod -R 600 /root/.ssh diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run b/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run deleted file mode 100755 index 063b570..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/with-contenv bash - -# This is the init file used for adding os or pip packages to install lists. -# It takes advantage of the built-in init-mods-package-install init script that comes with the baseimages. -# If using this, we need to make sure we set this init as a dependency of init-mods-package-install so this one runs first - -if ! command -v apprise; then - echo "**** Adding apprise and its deps to package install lists ****" - echo "apprise" >> /mod-pip-packages-to-install.list - ## Ubuntu - if [ -f /usr/bin/apt ]; then - echo "\ - python3 \ - python3-pip \ - runc" >> /mod-repo-packages-to-install.list - fi - # Alpine - if [ -f /sbin/apk ]; then - echo "\ - cargo \ - libffi-dev \ - openssl-dev \ - python3 \ - python3-dev \ - python3 \ - py3-pip" >> /mod-repo-packages-to-install.list - fi -else - echo "**** apprise already installed, skipping ****" -fi diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/type b/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/type deleted file mode 100644 index 3d92b15..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up b/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up deleted file mode 100644 index 6414139..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type b/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type deleted file mode 100644 index 3d92b15..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/up b/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/up deleted file mode 100644 index 03d298d..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/dependencies.d/init-mods b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/dependencies.d/init-mods similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/dependencies.d/init-mods rename to root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/dependencies.d/init-mods diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/run b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/run new file mode 100755 index 0000000..25385c2 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/run @@ -0,0 +1,11 @@ +#!/usr/bin/with-contenv bash +# shellcheck shell=bash + +# This is the init file used for adding os or pip packages to install lists. +# It takes advantage of the built-in init-mods-package-install init script that comes with the baseimages. +# If using this, we need to make sure we set this init as a dependency of init-mods-package-install so this one runs first + +if [[ -f /sbin/apk ]]; then + echo "\ + libgomp" >> /mod-repo-packages-to-install.list +fi diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/type b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/up b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/up new file mode 100644 index 0000000..07e4628 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-add-package/run diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/dependencies.d/init-mods-package-install b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/dependencies.d/init-mods-package-install similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/dependencies.d/init-mods-package-install rename to root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/dependencies.d/init-mods-package-install diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run similarity index 76% rename from root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run rename to root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run index 59a4b77..4290253 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run @@ -4,5 +4,5 @@ # so it can take advantage of packages installed # init-mods-end depends on this script so that later init and services wait until this script exits -echo "**** Setting up apprise ****" -apprise blah blah +echo "*** Removing existing par2cmdline packages ***" +apk del --purge par2cmdline diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/type b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/type @@ -0,0 +1 @@ +oneshot diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/up b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/up new file mode 100644 index 0000000..4c5db06 --- /dev/null +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init-mod-sabnzbd-par2cmdline-turbo-install/run diff --git a/root/etc/s6-overlay/s6-rc.d/init-mods-end/dependencies.d/init-mod-imagename-modname-install b/root/etc/s6-overlay/s6-rc.d/init-mods-end/dependencies.d/init-mod-sabnzbd-par2cmdline-turbo-install similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/init-mods-end/dependencies.d/init-mod-imagename-modname-install rename to root/etc/s6-overlay/s6-rc.d/init-mods-end/dependencies.d/init-mod-sabnzbd-par2cmdline-turbo-install diff --git a/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-imagename-modname-add-package b/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-sabnzbd-par2cmdline-turbo-add-package similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-imagename-modname-add-package rename to root/etc/s6-overlay/s6-rc.d/init-mods-package-install/dependencies.d/init-mod-sabnzbd-par2cmdline-turbo-add-package diff --git a/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/run b/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/run deleted file mode 100755 index 02ffe39..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/run +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/with-contenv bash - -# This is an example service that would run for the mod -# It depends on init-services, the baseimage hook for start of all longrun services - -exec \ - s6-setuidgid abc run my app diff --git a/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/type b/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/type deleted file mode 100644 index 1780f9f..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-imagename-modname-install b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-imagename-modname-install deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-sabnzbd-par2cmdline-turbo-add-package similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/svc-mod-imagename-modname/dependencies.d/init-services rename to root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-sabnzbd-par2cmdline-turbo-add-package diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-imagename-modname-add-package b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-sabnzbd-par2cmdline-turbo-install similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-imagename-modname-add-package rename to root/etc/s6-overlay/s6-rc.d/user/contents.d/init-mod-sabnzbd-par2cmdline-turbo-install diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-mod-imagename-modname b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-mod-imagename-modname deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/services.d/sshvpn/run b/root/etc/services.d/sshvpn/run deleted file mode 100755 index 7d49e79..0000000 --- a/root/etc/services.d/sshvpn/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -sshuttle --dns --remote root@${HOST}:${PORT} 0/0 -x 172.17.0.0/16 From 86d6809a77eae18aa98bd5871a3a0ceab2745ef1 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:12:52 +0000 Subject: [PATCH 2/8] Change how var is passed --- .github/workflows/BuildImage.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 44da459..8e802c6 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -6,12 +6,13 @@ env: ENDPOINT: "linuxserver/mods" #don't modify BASEIMAGE: "sabnzbd" #replace MODNAME: "par2cmdline-turbo" #replace + CHECKOUT_VERSION: ${{ vars.ENV_CONTEXT_VAR }} jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@${{ vars.CHECKOUT_VERSION }} + - uses: actions/checkout@${CHECKOUT_VERSION} - name: Build image run: | From 2d8fe93f572355d0cf4dce6c0c4ab0b0f7d378ad Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:15:58 +0000 Subject: [PATCH 3/8] Static versioning --- .github/workflows/BuildImage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 8e802c6..b21d87a 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -6,13 +6,12 @@ env: ENDPOINT: "linuxserver/mods" #don't modify BASEIMAGE: "sabnzbd" #replace MODNAME: "par2cmdline-turbo" #replace - CHECKOUT_VERSION: ${{ vars.ENV_CONTEXT_VAR }} jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@${CHECKOUT_VERSION} + - uses: actions/checkout@v3.4.0 - name: Build image run: | From 3507d4e480f3fb5f1d9a8f6503ce9e7e5220dfd2 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:17:22 +0000 Subject: [PATCH 4/8] Use major version tag for actions --- .github/workflows/BuildImage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index b21d87a..5cfc5c8 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -11,7 +11,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.4.0 + - uses: actions/checkout@v3 - name: Build image run: | From 0b544dd525aa7d0cb8aad67e8b6ef00ee6a357f4 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:17:40 +0000 Subject: [PATCH 5/8] Remove comments --- .github/workflows/BuildImage.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 5cfc5c8..344969e 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -3,9 +3,9 @@ name: Build Image on: [push, pull_request, workflow_dispatch] env: - ENDPOINT: "linuxserver/mods" #don't modify - BASEIMAGE: "sabnzbd" #replace - MODNAME: "par2cmdline-turbo" #replace + ENDPOINT: "linuxserver/mods" + BASEIMAGE: "sabnzbd" + MODNAME: "par2cmdline-turbo" jobs: build: From 18f4aee234cc17157a3a009e99c9014303c9bad4 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:41:58 +0000 Subject: [PATCH 6/8] Test action changes --- .github/workflows/BuildImage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 344969e..6edeed0 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -11,7 +11,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: linuxserver/github-workflows/.github/workflows/checkout-helper.yml@53bbab3b19f79737f6a6fc7c731aff16772ca5b2 - name: Build image run: | From 3036f839dc078034fd09693d611a88932841510f Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:46:58 +0000 Subject: [PATCH 7/8] Try again --- .github/workflows/BuildImage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 6edeed0..4b0d66a 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -8,11 +8,11 @@ env: MODNAME: "par2cmdline-turbo" jobs: + checkout: + uses: linuxserver/github-workflows/.github/workflows/checkout-helper.yml@53bbab3b19f79737f6a6fc7c731aff16772ca5b2 build: runs-on: ubuntu-latest steps: - - uses: linuxserver/github-workflows/.github/workflows/checkout-helper.yml@53bbab3b19f79737f6a6fc7c731aff16772ca5b2 - - name: Build image run: | docker build --no-cache -t ${{ github.sha }} . From 8ec7b3e6b916ea398817f0ed4ce9affa5bc556fd Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 18 Mar 2023 15:56:01 +0000 Subject: [PATCH 8/8] Revert to original action --- .github/workflows/BuildImage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BuildImage.yml b/.github/workflows/BuildImage.yml index 4b0d66a..344969e 100644 --- a/.github/workflows/BuildImage.yml +++ b/.github/workflows/BuildImage.yml @@ -8,11 +8,11 @@ env: MODNAME: "par2cmdline-turbo" jobs: - checkout: - uses: linuxserver/github-workflows/.github/workflows/checkout-helper.yml@53bbab3b19f79737f6a6fc7c731aff16772ca5b2 build: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - name: Build image run: | docker build --no-cache -t ${{ github.sha }} .