Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
required: false
type: string
default: "latest"
type: string
docker_registry:
description: "Docker Registry URL"
default: "docker.io"
Expand All @@ -19,6 +18,10 @@ on:
description: "Docker Repository"
default: "onosproject/"
type: string
github_registry:
description: "GitHub Container Registry URL"
default: "ghcr.io"
type: string

jobs:
release-image:
Expand All @@ -40,10 +43,25 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3.4.0
with:
registry: ${{ inputs.github_registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push to Docker Registry
env:
DOCKER_REGISTRY: ${{ inputs.docker_registry }}/
DOCKER_REPOSITORY: ${{ inputs.docker_repository }}
run: |
make docker-build
make docker-push

- name: Build and Push to GitHub Container Registry
env:
DOCKER_REGISTRY: ${{ inputs.github_registry }}/
DOCKER_REPOSITORY: ${{ github.repository_owner }}/
run: |
make docker-build
make docker-push