Skip to content

Commit

Permalink
Switches Docker image registry to Docker Hub
Browse files Browse the repository at this point in the history
Changes the Docker image registry from GitHub Container Registry (GHCR) to Docker Hub.  Updates the workflow to use Docker Hub credentials and tag the images appropriately.  Adds multiple tags for latest, SHA, and run ID. Includes platform specification for the build.
  • Loading branch information
seekersoftec committed Nov 28, 2024
1 parent 74b3780 commit 31d1ffb
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/deploy-rpyc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ jobs:
- name: Login to GHCR
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGES_TOKEN }}
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get branch name
id: branch-name
Expand All @@ -59,9 +58,35 @@ jobs:
with:
file: "infrastructure/MetaTrader5/Dockerfile"
context: "infrastructure/MetaTrader5/"
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository_owner }}/metatrader5-terminal:latest
tags: ${{ github.repository_owner }}/metatrader5-terminal:latest,${{ github.repository_owner }}/metatrader5-terminal:${{ github.sha }},${{ github.repository_owner }}/metatrader5-terminal:${{ github.run_id }}
cache-from: type=gha
cache-to: type=gha
- name: Digest metatrader5-terminal image
run: echo ${{ steps.mt5_build_latest.outputs.digest }}

# - name: Login to GHCR
# uses: docker/login-action@v3.1.0
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.PACKAGES_TOKEN }}

# - name: Get branch name
# id: branch-name
# uses: tj-actions/branch-names@v8.0.1

# - name: Build MetaTrader 5 Terminal image (latest)
# if: ${{ steps.branch-name.outputs.current_branch == 'main' }}
# id: mt5_build_latest
# uses: docker/build-push-action@v3
# with:
# file: "infrastructure/MetaTrader5/Dockerfile"
# context: "infrastructure/MetaTrader5/"
# push: true
# tags: ghcr.io/${{ github.repository_owner }}/metatrader5-terminal:latest
# cache-from: type=gha
# cache-to: type=gha
# - name: Digest metatrader5-terminal image
# run: echo ${{ steps.mt5_build_latest.outputs.digest }}

0 comments on commit 31d1ffb

Please sign in to comment.