summaryrefslogtreecommitdiff
path: root/.github/workflows/container.yml
diff options
context:
space:
mode:
authorIvan Gabaldon <igabaldon@inetol.net>2025-05-25 14:54:27 +0200
committerGitHub <noreply@github.com>2025-05-25 14:54:27 +0200
commit14b8a999f3929975756ed6f9dc33c54977b5cedc (patch)
tree48eb9c69a8d1436ef1f84ff20d01f3386fe7187d /.github/workflows/container.yml
parent848c8d0544eb0138da4414a750f79b22883f91b2 (diff)
[mod] ci: exclude some workflows from forks (#4849)
Excludes some workflows/jobs unneeded on forks. Closes https://github.com/searxng/searxng/issues/4847
Diffstat (limited to '.github/workflows/container.yml')
-rw-r--r--.github/workflows/container.yml17
1 files changed, 10 insertions, 7 deletions
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
index ccdba770e..0285bcd5c 100644
--- a/.github/workflows/container.yml
+++ b/.github/workflows/container.yml
@@ -36,16 +36,19 @@ jobs:
packages: write
steps:
- - name: Checkout
+ - if: github.repository_owner == 'searxng'
+ name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: "false"
- - name: Get date
+ - if: github.repository_owner == 'searxng'
+ name: Get date
id: date
run: echo "date=$(date +'%Y%m%d')" >>$GITHUB_OUTPUT
- - name: Check cache apko
+ - if: github.repository_owner == 'searxng'
+ name: Check cache apko
id: cache-apko
uses: actions/cache/restore@v4
with:
@@ -54,7 +57,7 @@ jobs:
path: "/tmp/.apko/"
lookup-only: true
- - if: steps.cache-apko.outputs.cache-hit != 'true'
+ - if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Setup cache apko
uses: actions/cache@v4
with:
@@ -63,13 +66,13 @@ jobs:
restore-keys: "apko-${{ steps.date.outputs.date }}-"
path: "/tmp/.apko/"
- - if: steps.cache-apko.outputs.cache-hit != 'true'
+ - if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Setup apko
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install apko
- - if: steps.cache-apko.outputs.cache-hit != 'true'
+ - if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Login to GHCR
uses: docker/login-action@v3
with:
@@ -77,7 +80,7 @@ jobs:
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- - if: steps.cache-apko.outputs.cache-hit != 'true'
+ - if: github.repository_owner == 'searxng' && steps.cache-apko.outputs.cache-hit != 'true'
name: Build
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"