mirror of
https://github.com/litruv/API-WebSocket-Bridge.git
synced 2026-07-24 02:36:03 +10:00
Update docker-push.yml, support gh
This commit is contained in:
19
.github/workflows/docker-push.yml
vendored
19
.github/workflows/docker-push.yml
vendored
@@ -3,6 +3,7 @@ name: Docker
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
workflow_dispatch: # Add manual trigger
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -11,7 +12,7 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log into Docker registry
|
||||
- name: Log into Docker Hub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: docker.io
|
||||
@@ -23,9 +24,23 @@ jobs:
|
||||
run: |
|
||||
echo "IMAGE_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push Docker image
|
||||
- name: Build and push Docker image to Docker Hub
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: docker.io/litruv/api-websocket-bridge:${{ env.IMAGE_TAG }}
|
||||
|
||||
- name: Log into GitHub Docker Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image to GitHub Docker Registry
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
|
||||
|
||||
Reference in New Issue
Block a user