-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor workflow to use hub.docker registry
- Loading branch information
Showing
2 changed files
with
45 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Publish Docker image | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: "Please provide a git tag value, e.g. v1.0-manually-triggered.1" | ||
required: true | ||
type: string | ||
default: "v1.0-manually-triggered.1" | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
push_to_docker_hub: | ||
|
||
name: build push docker image | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildkit env | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log in to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: "${{ env.BUILD_CONTEXT }}" | ||
target: ${{ env.BUILD_TARGET_STAGE }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha |
This file was deleted.
Oops, something went wrong.