aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-01-13 11:04:54 +0800
committerGitHub <noreply@github.com>2022-01-13 11:04:54 +0800
commitc8476b1c2e5dc8e430713722daa0bc4ba5e07103 (patch)
treef0c3e5781201180e53d0176ff6f1b3b1f49f2e3c /.github/workflows/docker.yml
parentcbe775aee28c0c1b2746460127efe9d7299c4a34 (diff)
docker: add job for pull requests from forks (#6724)
Diffstat (limited to '.github/workflows/docker.yml')
-rw-r--r--.github/workflows/docker.yml30
1 files changed, 29 insertions, 1 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 815f1806..67ef8883 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -81,7 +81,7 @@ jobs:
View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
buildx-pull-request:
- if: ${{ github.event_name == 'pull_request' }}
+ if: ${{ github.event_name == 'pull_request' && github.repository == 'gogs/gogs' }}
runs-on: ubuntu-latest
permissions:
contents: read
@@ -118,6 +118,34 @@ jobs:
tags: |
gogs/gogs:commit-${{ env.SHA }}
+ buildx-pull-request-fork:
+ if: ${{ github.event_name == 'pull_request' && github.repository != 'gogs/gogs' }}
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ - name: Set up Docker Buildx
+ id: buildx
+ uses: docker/setup-buildx-action@v1
+ with:
+ config-inline: |
+ [worker.oci]
+ max-parallelism = 2
+ - name: Inspect builder
+ run: |
+ echo "Name: ${{ steps.buildx.outputs.name }}"
+ echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
+ echo "Status: ${{ steps.buildx.outputs.status }}"
+ echo "Flags: ${{ steps.buildx.outputs.flags }}"
+ echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
+ - name: Build images
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ platforms: linux/amd64
+
buildx-release:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest