Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for release versioning for Forge #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and publish to Puppet Forge

on:
release:
type: created

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get latest tag
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- name: Clone repository
uses: actions/checkout@v1
with:
ref: ${{ env.RELEASE_VERSION }}
- name: Build and publish module
uses: barnumbirr/[email protected]
env:
FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }}
REPOSITORY_URL: https://forgeapi.puppet.com/v3/releases
- name: Setup environment for Docker image publish
run: |
echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- 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-puppet:${{ env.RELEASE_VERSION }}-OV5.4
- name: Push the tagged Docker image
run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-puppet:${{ env.RELEASE_VERSION }}-OV5.4