Skip to content

Commit

Permalink
Merge pull request #95 from tv2/SOF-1770/register-publish-image-workflow
Browse files Browse the repository at this point in the history
SOF-1770: Register Publish image workflow to repository
  • Loading branch information
KvelaGorrrrnio authored Jan 19, 2024
2 parents c78fa41 + 0be0e36 commit bf20da8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-image.yml
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 }}

0 comments on commit bf20da8

Please sign in to comment.