chore: dont login to dockerhub on PR

This commit is contained in:
jamesread 2026-06-20 01:26:27 +01:00
parent c660554de8
commit 932635f44f
1 changed files with 7 additions and 3 deletions

View File

@ -73,13 +73,15 @@ jobs:
run: go version run: go version
- name: Login to Docker Hub - name: Login to Docker Hub
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
uses: docker/login-action@v4 uses: docker/login-action@v4
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_KEY }} password: ${{ secrets.DOCKERHUB_KEY }}
- name: Login to ghcr - name: Login to ghcr
uses: docker/login-action@v3 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
uses: docker/login-action@v4
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@ -111,15 +113,17 @@ jobs:
!integration-tests/node_modules !integration-tests/node_modules
- name: Install goreleaser - name: Install goreleaser
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
uses: goreleaser/goreleaser-action@v6 uses: goreleaser/goreleaser-action@v6
with: with:
install-only: true install-only: true
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: release - name: release
if: github.ref_type != 'tag' if: github.ref_type != 'tag' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
uses: cycjimmy/semantic-release-action@v4 uses: cycjimmy/semantic-release-action@v4
with: with:
extra_plugins: | extra_plugins: |
@ -131,8 +135,8 @@ jobs:
GH_TOKEN: ${{ secrets.CONTAINER_TOKEN }} GH_TOKEN: ${{ secrets.CONTAINER_TOKEN }}
- name: Archive binaries - name: Archive binaries
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
uses: actions/upload-artifact@v4.3.1 uses: actions/upload-artifact@v4.3.1
with: with:
name: "OliveTin-snapshot-${{ env.DATE }}-${{ github.sha }}" name: "OliveTin-snapshot-${{ env.DATE }}-${{ github.sha }}"
path: dist/OliveTin*.* path: dist/OliveTin*.*