OPCT-257: fixes ci workflow preventing release deployment (#58) #320
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
--- | |
name: release-tag | |
on: | |
pull_request: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
linters: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Shellcheck - hack | |
uses: azohra/shell-linter@latest | |
with: | |
path: "hack/*.sh" | |
- name: Shellcheck - Plugin - openshift-tests | |
uses: azohra/shell-linter@latest | |
with: | |
path: './openshift-tests-provider-cert/plugin/*.sh' | |
- name: Shellcheck - Plugin - openshift-tests - hack | |
uses: azohra/shell-linter@latest | |
with: | |
path: './openshift-tests-provider-cert/hack/*.sh' | |
# | |
# Releasing: triggered when a tag is created | |
# | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: [linters] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set vars | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Push Container image | |
env: | |
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} | |
QUAY_USER: ${{ secrets.QUAY_USER }} | |
QUAY_PASS: ${{ secrets.QUAY_PASS }} | |
run: | | |
podman login -u="${QUAY_USER}" -p="${QUAY_PASS}" quay.io | |
cd openshift-tests-provider-cert/; | |
make release VERSION=$RELEASE_VERSION | |
# https://github.com/mikepenz/release-changelog-builder-action#configuration | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/[email protected] | |
with: | |
configuration: ".github/workflows/changelog-configuration.json" | |
# https://github.com/softprops/action-gh-release | |
- name: Create Release on Github | |
uses: softprops/[email protected] | |
env: | |
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} | |
with: | |
body: | | |
## Changelog | |
Image published to [quay.io/ocp-cert/openshift-tests-provider-cert:$RELEASE_VERSION](https://quay.io/repository/ocp-cert/openshift-tests-provider-cert?tab=tags) | |
${{steps.github_release.outputs.changelog}} |