aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-05-29 22:37:13 +0800
committerGitHub <noreply@github.com>2022-05-29 22:37:13 +0800
commit069d832a51cffe4505eb4165c2494225626d2adb (patch)
treee4c8e9a74da413742d3333f4078fddf415bb5bd3 /.github/workflows
parent04d3946511709c11825e47aaeb25881856bede6d (diff)
docker: push ephemeral image to ttl.sh for pull requests (#6981)
[skip ci]
Diffstat (limited to '.github/workflows')
1 files changed, 2 insertions, 35 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index adc43e9b..ec11f25f 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' && github.repository == 'gogs/gogs' }}
+ if: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
permissions:
contents: read
@@ -102,11 +102,6 @@ jobs:
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- - name: Login to Docker Hub
- uses: docker/login-action@v1
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Compute short commit SHA
uses: benjlevesque/short-sha@v1.2
- name: Build and push images
@@ -116,35 +111,7 @@ jobs:
platforms: linux/amd64
push: true
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
+ ttl.sh/gogs/gogs-${{ env.SHA }}:1d
# Updates to the following section needs to be synced to all release branches within their lifecycles.
buildx-release: