-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from tv2/SOF-1770/register-publish-image-workflow
SOF-1770: Register Publish image workflow to repository
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 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,37 @@ | ||
name: 'Publish image' | ||
|
||
run-name: 'Publish image of {{ github.ref_name }} as {{ inputs.versionTag }}' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
versionTag: | ||
description: 'Version tag (e.g. 1.2.3-staging)' | ||
required: true | ||
type: 'string' | ||
|
||
env: | ||
node-version: '16' | ||
node-package-manager: 'yarn' | ||
|
||
jobs: | ||
publish-image-to-docker-hub: | ||
name: 'Publish image to Docker Hub' | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: 'Retrieve repository files' | ||
uses: 'actions/checkout@v4' | ||
|
||
- name: 'Log in to Docker Hub' | ||
uses: 'docker/login-action@v3' | ||
with: | ||
username: '${{ secrets.DOCKERHUB_USERNAME }}' | ||
password: '${{ secrets.DOCKERHUB_PASSWORD }}' | ||
|
||
- name: 'Build and publish Docker image' | ||
uses: 'docker/build-push-action@v5' | ||
with: | ||
context: '.' | ||
push: true | ||
tags: | | ||
tv2media/inews-ftp-gateway:${{ inputs.versionTag }} |