Skip to content

Commit

Permalink
Login to dockerhub and use the correct image name
Browse files Browse the repository at this point in the history
  • Loading branch information
miigotu committed Mar 23, 2021
1 parent 23caa6d commit b1c0849
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/build_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,22 @@ jobs:
id: prepare
run: |
echo ::set-output name=docker_platforms::linux/amd64,linux/386
echo ::set-output name=docker_username::miigotu
echo ::set-output name=github_image::ghcr.io/${GITHUB_REPOSITORY,,}/ps3dev
VERSION_TAG=${GITHUB_REF#refs/*/}
echo ::set-output name=version::${VERSION_TAG%/merge}
# - name: Login to DockerHub
# if: success()
# id: login_docker
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to DockerHub
if: success()
id: login_docker
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Container Registry
if: success()
id: login_github
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ steps.prepare.outputs.docker_username }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push (master)
if: success() && steps.prepare.outputs.version == 'master' && github.event_name != 'pull_request'
Expand All @@ -77,8 +75,10 @@ jobs:
platforms: ${{ steps.prepare.outputs.docker_platforms }}
push: true
tags: |
${{ steps.prepare.outputs.github_image }}:master
${{ steps.prepare.outputs.github_image }}:latest
ghcr.io/ps3dev/ps3dev:master
ghcr.io/ps3dev/ps3dev:latest
ps3dev/ps3dev:master
ps3dev/ps3dev:latest
- name: Build and push (development)
if: success() && steps.prepare.outputs.version != 'master'
id: build_push_development
Expand All @@ -88,7 +88,8 @@ jobs:
platforms: ${{ steps.prepare.outputs.docker_platforms }}
push: true
tags: |
${{ steps.prepare.outputs.github_image }}:${{ steps.prepare.outputs.version }}
ps3dev/ps3dev:${{ steps.prepare.outputs.version }}
ghcr.io/ps3dev/ps3dev:${{ steps.prepare.outputs.version }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Move cache
Expand Down

0 comments on commit b1c0849

Please sign in to comment.