mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
use seperate step
This commit is contained in:
parent
74db897b9c
commit
2031c70c8e
13
.github/workflows/docker.yaml
vendored
13
.github/workflows/docker.yaml
vendored
@ -122,15 +122,20 @@ jobs:
|
||||
- name: Set up cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # pin@v3.1.2
|
||||
- name: Check if Dockerhub login is required
|
||||
id: docker_login
|
||||
run: |
|
||||
if [ -z "${{ secrets.DOCKER_USERNAME }}" ]; then
|
||||
echo "::set-env name=skip_dockerhub_login::true"
|
||||
else
|
||||
echo "::set-env name=skip_dockerhub_login::false"
|
||||
fi
|
||||
- name: Login to Dockerhub
|
||||
if: github.event_name != 'pull_request' && ${{ env.username != '' }}
|
||||
if: github.event_name != 'pull_request' && steps.docker_login.outputs.skip_dockerhub_login != 'true'
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # pin@v3.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
env:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Log into registry ghcr.io
|
||||
if: github.event_name != 'pull_request'
|
||||
|
Loading…
Reference in New Issue
Block a user