From 06582fe4c3eae050f59c728b1c988635ebb0b170 Mon Sep 17 00:00:00 2001 From: garmoncheg Date: Sat, 7 Sep 2024 23:10:52 +0300 Subject: [PATCH 1/6] Move debug contexts params to config (#552) --- modules/api/views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/api/views.js b/modules/api/views.js index d5ce4d3f1..c17334a6f 100644 --- a/modules/api/views.js +++ b/modules/api/views.js @@ -133,7 +133,7 @@ export default function(app) { debug: getBooleanParam(req, 'debug'), returnProviderOptionsUsage: getBooleanParam(req, 'debug'), mixAllWithDomainPlugin: getBooleanParam(req, 'mixAllWithDomainPlugin'), - forceParams: req.query.meta === "true" ? ["meta", "oembed"] : null, + forceParams: req.query.meta === "true" ? CONFIG.DEBUG_CONTEXTS : null, whitelist: getBooleanParam(req, 'whitelist'), readability: getBooleanParam(req, 'readability'), getWhitelistRecord: whitelist.findWhitelistRecordFor, From bdcdb6bbf56d944b1a16375297bd9fbbaf36e5ce Mon Sep 17 00:00:00 2001 From: ItsNik Date: Mon, 28 Oct 2024 19:56:34 +0100 Subject: [PATCH 2/6] Create docker-image.yml --- .github/workflows/docker-image.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 000000000..0191e2942 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,26 @@ +name: Docker Image CI + +on: + release: + types: [published] + +permissions: + packages: write + contents: read + +jobs: + build-main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + name: Checkout repository + + - uses: pmorelli92/github-container-registry-build-push@2.2.1 + name: Build and Publish latest service image + with: + github-push-secret: ${{secrets.GITHUB_TOKEN}} + docker-image-name: iframely + docker-image-tag: latest + dockerfile-path: Dockerfile + build-context: . + build-only: false From 248fea25b2753cb7aa4ffa5c4da9c0e79ad616be Mon Sep 17 00:00:00 2001 From: ItsNik Date: Wed, 30 Oct 2024 21:35:00 +0100 Subject: [PATCH 3/6] Update docker-image.yml --- .github/workflows/docker-image.yml | 40 ++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0191e2942..25056394b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,15 +12,35 @@ jobs: build-main: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - name: Checkout repository + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - - uses: pmorelli92/github-container-registry-build-push@2.2.1 - name: Build and Publish latest service image + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Github Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ github.token }} + + - name: Generate Docker tags + uses: docker/metadata-action@v5 + id: metadata + with: + images: ghcr.io/${{ github.repository }} + tags: | + type=sha,format=long,prefix= + flavor: | + latest=true + + - name: Build and push + uses: docker/build-push-action@v5 with: - github-push-secret: ${{secrets.GITHUB_TOKEN}} - docker-image-name: iframely - docker-image-tag: latest - dockerfile-path: Dockerfile - build-context: . - build-only: false + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max From 9940d0552ee80f43b7e5d70011a48f14e49468ea Mon Sep 17 00:00:00 2001 From: ItsNik Date: Wed, 30 Oct 2024 21:38:05 +0100 Subject: [PATCH 4/6] Update docker-image.yml --- .github/workflows/docker-image.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 25056394b..3448a6846 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,6 +1,10 @@ name: Docker Image CI on: + push: + branches: + - 'patch-2' + release: types: [published] From 786e11cf2cd16c201d3b7e687147bc32bcc8343c Mon Sep 17 00:00:00 2001 From: ItsNik Date: Wed, 30 Oct 2024 22:27:44 +0100 Subject: [PATCH 5/6] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c2488dc4a..13f22c5e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN yarn install --pure-lockfile --production COPY . /iframely -RUN chown -R iframely /iframely/config.local.js +RUN chown -R iframely /iframely/config.local.js || { echo "Creating config.local.js" && touch /iframely/config.local.js } USER iframely From a322259c4b022d25c789549047280593b76c65e0 Mon Sep 17 00:00:00 2001 From: ItsNik Date: Wed, 30 Oct 2024 22:29:46 +0100 Subject: [PATCH 6/6] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 13f22c5e3..670be12a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN yarn install --pure-lockfile --production COPY . /iframely -RUN chown -R iframely /iframely/config.local.js || { echo "Creating config.local.js" && touch /iframely/config.local.js } +RUN chown -R iframely /iframely/config.local.js || touch /iframely/config.local.js USER iframely