Skip to content

Commit

Permalink
Update build-latest.yml
Browse files Browse the repository at this point in the history
Streamline push process
  • Loading branch information
InsertDisc authored Jan 10, 2024
1 parent cf498a5 commit 98ce7a0
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
Expand All @@ -43,24 +49,9 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ghcr.io/insertdisc/pattrmm:latest
tags: |
ghcr.io/insertdisc/pattrmm:latest
${{ secrets.DOCKER_HUB_USERNAME }}/pattrmm:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Pull image from GitHub Container Registry
run: docker pull ghcr.io/insertdisc/pattrmm:latest

- name: Tag for Docker Hub
run: |
docker tag ghcr.io/insertdisc/pattrmm:latest ${{ secrets.DOCKER_HUB_USERNAME }}/pattrmm:latest
- name: Push to Docker Hub
run: |
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/pattrmm:latest
cache-to: type=gha,mode=max

0 comments on commit 98ce7a0

Please sign in to comment.