Skip to content

Action to push image to dockerhub #4

Action to push image to dockerhub

Action to push image to dockerhub #4

Workflow file for this run

name: Docker
on:
push:
tags:
- '*'
env:
IMAGE_PATH: formio/uswds-viewer
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up SSH key
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Create image
run: docker build --no-cache -t $IMAGE_PATH .
- name: Push image to dockerhub
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag $IMAGE_PATH $IMAGE_PATH:${{ github.ref }}
ocker push $IMAGE_PATH:${{ github.ref }}