From 3dc87627ca1e52ded127fdbdfe38d553fe5e679d Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 03:52:17 +0500 Subject: [PATCH 01/19] added dockerfile & dockerignore --- .dockerignore | 11 +++++++++++ Dockerfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..49bbb6b17 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git +.gitignore + +**/target +**/node_modules + +**/*.log +**/*.md +**/tmp + +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..757bde33c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,50 @@ +# syntax=docker/dockerfile:1.4 + +# Cargo build stage +FROM rust:1.80-slim AS cargo-builder + +# Install Rust dependencies +RUN --mount=type=cache,target=/var/cache/apt \ + --mount=type=cache,target=/usr/local/cargo/registry \ + apt-get update && apt-get install -y --no-install-recommends \ + libdbus-1-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev \ + libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ + libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ + gnome-video-effects \ + && rm -rf /var/lib/apt/lists/* # Clean up to reduce image size + +COPY . /pake +WORKDIR /pake/src-tauri + +# Build cargo packages +RUN --mount=type=cache,target=/usr/local/cargo/registry \ + cargo fetch && \ + cargo build --release + +# Main build stage +FROM rust:1.80-slim AS builder + +# Install Node.js 19.x and Rust dependencies +RUN --mount=type=cache,target=/var/cache/apt \ + apt-get update && apt-get install -y \ + libdbus-1-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev \ + libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ + libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ + gnome-video-effects \ + && rm -rf /var/lib/apt/lists/* + +# Install Node.js 19.x +RUN --mount=type=cache,target=/var/cache/apt \ + curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get update && apt-get install -y nodejs + +# Install pake-cli and its implicit runtime dependencies +RUN --mount=type=cache,target=/root/.npm \ + npm install -g pake-cli && \ + cd /usr/lib/node_modules/pake-cli && \ + npm install + +COPY --from=cargo-builder /pake/src-tauri /usr/lib/node_modules/pake-cli/src-tauri + +WORKDIR /app +ENTRYPOINT ["pake"] From e8bf3654414b0b902d43bced404c99b21d7623aa Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 04:03:00 +0500 Subject: [PATCH 02/19] added docker image publish github action --- .github/workflows/docker-publish.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 000000000..394bce7bd --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,44 @@ +name: Build and Publish Docker Image + +on: + push: + branches: [ "master" ] # specify needed trigger + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 80f4cb5e6c1a5b0c1871b7da258b80b935059924 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 04:07:09 +0500 Subject: [PATCH 03/19] dockerfile removed apt cache clean --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 757bde33c..e02b72542 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ libdbus-1-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev \ libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ - gnome-video-effects \ - && rm -rf /var/lib/apt/lists/* # Clean up to reduce image size + gnome-video-effects COPY . /pake WORKDIR /pake/src-tauri @@ -30,8 +29,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ libdbus-1-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev \ libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ - gnome-video-effects \ - && rm -rf /var/lib/apt/lists/* + gnome-video-effects # Install Node.js 19.x RUN --mount=type=cache,target=/var/cache/apt \ From 2710c3a14a653efcb43938eab512ca3f5e8c0530 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 04:14:19 +0500 Subject: [PATCH 04/19] try resolve image build errors --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e02b72542..2e21b7bd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,10 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ # Main build stage FROM rust:1.80-slim AS builder -# Install Node.js 19.x and Rust dependencies +# Install Rust dependencies RUN --mount=type=cache,target=/var/cache/apt \ - apt-get update && apt-get install -y \ + --mount=type=cache,target=/usr/local/cargo/registry \ + apt-get update && apt-get install -y --no-install-recommends \ libdbus-1-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev \ libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ From c2954465d13f051292a8eca4bdedb14b4fa46ebf Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 04:39:57 +0500 Subject: [PATCH 05/19] dockerfile: improved copying from cargo-builder layer --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2e21b7bd7..b660cef38 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,8 @@ RUN --mount=type=cache,target=/root/.npm \ npm install COPY --from=cargo-builder /pake/src-tauri /usr/lib/node_modules/pake-cli/src-tauri +COPY --from=cargo-builder /usr/local/cargo/git /usr/local/cargo/git +COPY --from=cargo-builder /usr/local/cargo/registry/cache /usr/local/cargo/registry/cache WORKDIR /app ENTRYPOINT ["pake"] From b0ad0703142cd43f4f9b84b37e8166b354ac1b4c Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 04:52:05 +0500 Subject: [PATCH 06/19] use cache in docker build action --- .github/workflows/docker-publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 394bce7bd..93baf2332 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -19,6 +19,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Log in to the Container registry uses: docker/login-action@v2 with: @@ -42,3 +45,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max From 70a12a865123c19290c55e4332a1a5375e501153 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 05:23:16 +0500 Subject: [PATCH 07/19] try fix disappearing cache --- Dockerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b660cef38..ebf1076eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,16 @@ RUN --mount=type=cache,target=/var/cache/apt \ COPY . /pake WORKDIR /pake/src-tauri -# Build cargo packages +# Build cargo packages and store cache RUN --mount=type=cache,target=/usr/local/cargo/registry \ cargo fetch && \ - cargo build --release + cargo build --release && \ + mkdir -p /cargo-cache && \ + cp -R /usr/local/cargo/registry /cargo-cache/ && \ + cp -R /usr/local/cargo/git /cargo-cache/ + +# Ensure the content of /cargo-cache && clean unnecessary files +RUN ls -la /cargo-cache/registry && ls -la /cargo-cache/git && rm -rfd /cargo-cache/registry/cache # Main build stage FROM rust:1.80-slim AS builder @@ -44,8 +50,8 @@ RUN --mount=type=cache,target=/root/.npm \ npm install COPY --from=cargo-builder /pake/src-tauri /usr/lib/node_modules/pake-cli/src-tauri -COPY --from=cargo-builder /usr/local/cargo/git /usr/local/cargo/git -COPY --from=cargo-builder /usr/local/cargo/registry/cache /usr/local/cargo/registry/cache +COPY --from=cargo-builder /cargo-cache/git /usr/local/cargo/git +COPY --from=cargo-builder /cargo-cache/registry /usr/local/cargo/registry WORKDIR /app ENTRYPOINT ["pake"] From e5777251d9ea5d52965315478fac061674ed7fb8 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 05:38:50 +0500 Subject: [PATCH 08/19] fix incorrect cache files removal --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ebf1076eb..dc3feba17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ cp -R /usr/local/cargo/git /cargo-cache/ # Ensure the content of /cargo-cache && clean unnecessary files -RUN ls -la /cargo-cache/registry && ls -la /cargo-cache/git && rm -rfd /cargo-cache/registry/cache +RUN ls -la /cargo-cache/registry && ls -la /cargo-cache/git && rm -rfd /cargo-cache/registry/src # Main build stage FROM rust:1.80-slim AS builder From 8dabbb09cc6e64064bf4e03c7932ff055b0ece38 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 05:52:39 +0500 Subject: [PATCH 09/19] final workdir renamed --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dc3feba17..ab3ddb3ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,5 +53,5 @@ COPY --from=cargo-builder /pake/src-tauri /usr/lib/node_modules/pake-cli/src-tau COPY --from=cargo-builder /cargo-cache/git /usr/local/cargo/git COPY --from=cargo-builder /cargo-cache/registry /usr/local/cargo/registry -WORKDIR /app +WORKDIR /output ENTRYPOINT ["pake"] From 63d2cd96c0f35d67fec29055c0c79f5acc974908 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 20:45:31 +0500 Subject: [PATCH 10/19] try build pake-cli from source in Dockerfile --- Dockerfile | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab3ddb3ea..28c66b540 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ # syntax=docker/dockerfile:1.4 - # Cargo build stage FROM rust:1.80-slim AS cargo-builder - # Install Rust dependencies RUN --mount=type=cache,target=/var/cache/apt \ --mount=type=cache,target=/usr/local/cargo/registry \ @@ -11,10 +9,8 @@ RUN --mount=type=cache,target=/var/cache/apt \ libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ gnome-video-effects - COPY . /pake WORKDIR /pake/src-tauri - # Build cargo packages and store cache RUN --mount=type=cache,target=/usr/local/cargo/registry \ cargo fetch && \ @@ -23,12 +19,11 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ cp -R /usr/local/cargo/registry /cargo-cache/ && \ cp -R /usr/local/cargo/git /cargo-cache/ -# Ensure the content of /cargo-cache && clean unnecessary files +# Verify the content of /cargo-cache && clean unnecessary files RUN ls -la /cargo-cache/registry && ls -la /cargo-cache/git && rm -rfd /cargo-cache/registry/src # Main build stage FROM rust:1.80-slim AS builder - # Install Rust dependencies RUN --mount=type=cache,target=/var/cache/apt \ --mount=type=cache,target=/usr/local/cargo/registry \ @@ -38,20 +33,25 @@ RUN --mount=type=cache,target=/var/cache/apt \ libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev \ gnome-video-effects -# Install Node.js 19.x +# Install Node.js 20.x RUN --mount=type=cache,target=/var/cache/apt \ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ apt-get update && apt-get install -y nodejs -# Install pake-cli and its implicit runtime dependencies +# Copy project files +COPY . /pake +WORKDIR /pake + +# Install dependencies and build pake-cli RUN --mount=type=cache,target=/root/.npm \ - npm install -g pake-cli && \ - cd /usr/lib/node_modules/pake-cli && \ - npm install + npm ci && \ + npm run build -COPY --from=cargo-builder /pake/src-tauri /usr/lib/node_modules/pake-cli/src-tauri +# Copy Rust build artifacts +COPY --from=cargo-builder /pake/src-tauri /pake/src-tauri COPY --from=cargo-builder /cargo-cache/git /usr/local/cargo/git COPY --from=cargo-builder /cargo-cache/registry /usr/local/cargo/registry +# Set up the entrypoint WORKDIR /output -ENTRYPOINT ["pake"] +ENTRYPOINT ["node", "/pake/cli.js"] From 4a57edcda40924625425d2ed9c48deaac5ffcd88 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 20:48:53 +0500 Subject: [PATCH 11/19] fix npm build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 28c66b540..8466159bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ WORKDIR /pake # Install dependencies and build pake-cli RUN --mount=type=cache,target=/root/.npm \ - npm ci && \ + npm install && \ npm run build # Copy Rust build artifacts From 6e3a483257147a16df1b19383f2fe07976ab46ee Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 20:56:33 +0500 Subject: [PATCH 12/19] try fix build errors --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8466159bb..0c325bb26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,16 +42,16 @@ RUN --mount=type=cache,target=/var/cache/apt \ COPY . /pake WORKDIR /pake -# Install dependencies and build pake-cli -RUN --mount=type=cache,target=/root/.npm \ - npm install && \ - npm run build - # Copy Rust build artifacts COPY --from=cargo-builder /pake/src-tauri /pake/src-tauri COPY --from=cargo-builder /cargo-cache/git /usr/local/cargo/git COPY --from=cargo-builder /cargo-cache/registry /usr/local/cargo/registry +# Install dependencies and build pake-cli +RUN --mount=type=cache,target=/root/.npm \ + npm install && \ + npm run build + # Set up the entrypoint WORKDIR /output ENTRYPOINT ["node", "/pake/cli.js"] From c6a7123fed54d4286002502f1a764a31cc7912f7 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 21:44:21 +0500 Subject: [PATCH 13/19] try use cli:build --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0c325bb26..71eb285c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ COPY --from=cargo-builder /cargo-cache/registry /usr/local/cargo/registry # Install dependencies and build pake-cli RUN --mount=type=cache,target=/root/.npm \ npm install && \ - npm run build + npm run cli:build # Set up the entrypoint WORKDIR /output From 1c4c9818d706e1df0682e2351a7d6e83f535560f Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:12:59 +0500 Subject: [PATCH 14/19] docker image in readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index f1e5055c4..661c542a8 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,18 @@ pake url [OPTIONS]... # Feel free to play with Pake! It might take a while to prepare the environment the first time you launch Pake. pake https://weekly.tw93.fun --name Weekly --hide-title-bar + +# On Linux, you can run the Pake CLI via Docker +docker run -it --rm \ # Run interactively, remove container after exit + -v YOUR_DIR:/output \ # Files from container's /output will be in YOU_DIR + ghcr.io/stone-w4tch3r/pakefork \ + + +# For example: +docker run -it --rm \ + -v ./packages:/output \ + ghcr.io/stone-w4tch3r/pakefork \ + https://example.com --name MyApp --icon ./icon.png ``` If you are new to the command line, you can compile packages online with _GitHub Actions_. See the [Tutorial]() for more information. From 1bd738c2acc3a95e30358bd0f5ff5a00bfccb207 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:16:05 +0500 Subject: [PATCH 15/19] edit trigger comment Signed-off-by: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 93baf2332..d4e7e57de 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -2,7 +2,7 @@ name: Build and Publish Docker Image on: push: - branches: [ "master" ] # specify needed trigger + branches: [ "master" ] # TODO here you can specify needed trigger env: REGISTRY: ghcr.io From 2fc6555b15ff680f86c9e9f6edc945d021590356 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:21:55 +0500 Subject: [PATCH 16/19] changed image name in readme Signed-off-by: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 661c542a8..5b1b95be8 100644 --- a/README.md +++ b/README.md @@ -176,13 +176,13 @@ pake https://weekly.tw93.fun --name Weekly --hide-title-bar # On Linux, you can run the Pake CLI via Docker docker run -it --rm \ # Run interactively, remove container after exit -v YOUR_DIR:/output \ # Files from container's /output will be in YOU_DIR - ghcr.io/stone-w4tch3r/pakefork \ + ghcr.io/tw93/Pake \ # For example: docker run -it --rm \ -v ./packages:/output \ - ghcr.io/stone-w4tch3r/pakefork \ + ghcr.io/tw93/Pake \ https://example.com --name MyApp --icon ./icon.png ``` From eae0784b9a241c4f53babd0a949aade7c54cc003 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:24:07 +0500 Subject: [PATCH 17/19] minor fixes in docker usage Signed-off-by: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5b1b95be8..c956cf884 100644 --- a/README.md +++ b/README.md @@ -176,14 +176,14 @@ pake https://weekly.tw93.fun --name Weekly --hide-title-bar # On Linux, you can run the Pake CLI via Docker docker run -it --rm \ # Run interactively, remove container after exit -v YOUR_DIR:/output \ # Files from container's /output will be in YOU_DIR - ghcr.io/tw93/Pake \ + ghcr.io/tw93/pake \ # For example: docker run -it --rm \ -v ./packages:/output \ - ghcr.io/tw93/Pake \ - https://example.com --name MyApp --icon ./icon.png + ghcr.io/tw93/pake \ + https://example.com --name myapp --icon ./icon.png ``` If you are new to the command line, you can compile packages online with _GitHub Actions_. See the [Tutorial]() for more information. From d3850385610e36d5d079fe1d8c838e22ec3f7eab Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:10:25 +0500 Subject: [PATCH 18/19] added manual trigger and arm image --- .github/workflows/docker-publish.yml | 98 ++++++++++++++-------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d4e7e57de..46b62dc5e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,49 +1,49 @@ -name: Build and Publish Docker Image - -on: - push: - branches: [ "master" ] # TODO here you can specify needed trigger - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=sha - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max +name: Build and Publish Docker Image + +on: + workflow_dispatch: # Manual + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64 From af76769f0c1d7fb752dc99e6982eb300a2658a9b Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 14 Sep 2024 14:30:47 +0800 Subject: [PATCH 19/19] docs(contributor): contrib-readme-action has updated readme --- README.md | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index bb359eaa1..14a46143a 100644 --- a/README.md +++ b/README.md @@ -304,12 +304,34 @@ Pake's development can not be without these Hackers. They contributed a lot of c Ikko Eltociear Ashimine + + + mattbajorek +
+ Matt Bajorek +
+ QingZ11
Steam
+ + + + + Tianj0o +
+ Qitianjia +
+ + + + xinyii +
+ Yi Xin +
@@ -317,8 +339,7 @@ Pake's development can not be without these Hackers. They contributed a lot of c
孟世博
- - + 2nthony @@ -346,7 +367,8 @@ Pake's development can not be without these Hackers. They contributed a lot of c
An Li
- + + nekomeowww @@ -367,8 +389,7 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Fechin
- - + ImgBotApp @@ -383,13 +404,6 @@ Pake's development can not be without these Hackers. They contributed a lot of c Jiaqi Gu - - - mattbajorek -
- Matt Bajorek -
- Milo123459 @@ -403,22 +417,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Po Chen
- - - - Tianj0o -
- Qitianjia -
- + + geekvest
Null
- - + houhoz