Upload Docker Image #28
Workflow file for this run
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
# 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 |