Skip to content

Upload Docker Image #28

Upload Docker Image

Upload Docker Image #28

Workflow file for this run

# This workflows will upload a Docker Image when a release is created
name: Upload Docker Image
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup environment for Docker image publish
run: |
echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Build the tagged Docker image
run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-golang:${{ env.RELEASE_VERSION }}-OV8.9
- name: Push the tagged Docker image
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-golang:${{ env.RELEASE_VERSION }}-OV8.9