Skip to content

Commit

Permalink
ci: allow to publish to github package
Browse files Browse the repository at this point in the history
  • Loading branch information
manhinhang committed Apr 24, 2024
1 parent 1c0342d commit b247d33
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/deploy-dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to docker hub
name: "Publish Docker"

on:
push:
Expand All @@ -13,6 +13,19 @@ on:

jobs:
build:
strategy:
matrix:
include:
# Dockerhub
- images: manhinhang/ib-gateway-docker
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry:
# Github
- images: ghcr.io/manhinhang/ib-gateway-docker
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -21,12 +34,13 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: manhinhang/ib-gateway-docker
images: ${{ matrix.images }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
registry: ${{ matrix.registry }}
username: ${{ matrix.username }}
password: ${{ matrix.password }}
- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit b247d33

Please sign in to comment.