Skip to content

[release-v1.11] Disable internal encryption for non TLS test #120

[release-v1.11] Disable internal encryption for non TLS test

[release-v1.11] Disable internal encryption for non TLS test #120

Workflow file for this run

---
name: Validate
on:
pull_request:
branches:
- '**'
workflow_dispatch: # Manual workflow trigger
jobs:
generated-files-committed:
if: github.base_ref != 'main'
name: Generated files are committed
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
steps:
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: 1.19.x
- name: Checkout
uses: actions/checkout@v3
with:
path: ./src/github.com/${{ github.repository }}
fetch-depth: 0
- name: Regenerate all generated files
working-directory: ./src/github.com/${{ github.repository }}
run: ./openshift/release/generate-release.sh ${{ github.base_ref }}
- name: Check if everything is consistent
working-directory: ./src/github.com/${{ github.repository }}
run: |
if [ -n "$(git status --porcelain)" ]; then
echo '::debug::Running `git status`'
git -c color.status=always status
echo '::debug::Running `git diff`'
git -c color.ui=always diff
echo '::error::Not all generated files are commited. Run `openshift/release/generate-release.sh "BRANCH_NAME"` and commit files.'
exit 33
fi
lint:
name: Lint
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
steps:
- name: Set up Go 1.19.x
uses: actions/setup-go@v4
with:
go-version: 1.19.x
- name: Checkout
uses: actions/checkout@v2
with:
path: ./src/github.com/${{ github.repository }}
- name: Install Tools
working-directory: ./src/github.com/${{ github.repository }}
env:
WOKE_VERSION: v0.13.0
OSDK_VERSION: v1.12.0
run: |
TEMP_PATH="$(mktemp -d)"
cd $TEMP_PATH
echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog'
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" 2>&1
echo '::endgroup::'
echo '::group:: Installing misspell ... https://github.com/client9/misspell'
go install github.com/client9/misspell/cmd/misspell@latest
echo '::endgroup::'
echo '::group:: Installing woke ... https://github.com/get-woke/woke'
curl -sfL https://raw.githubusercontent.com/get-woke/woke/main/install.sh | sh -s -- -b "${TEMP_PATH}" "${WOKE_VERSION}" 2>&1
echo '::endgroup::'
echo "${TEMP_PATH}" >> $GITHUB_PATH
- name: Shellcheck
working-directory: ./src/github.com/${{ github.repository }}/openshift
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
find . -type f \
-path './**/*.*sh' \
-not -path '*vendor*' | xargs -r shellcheck --format=checkstyle \
| reviewdog -f=checkstyle \
-name="shellcheck" \
-reporter="github-pr-check" \
-filter-mode="added" \
-fail-on-error="true" \
-level="error"
# This is mostly copied from https://github.com/get-woke/woke-action-reviewdog/blob/main/entrypoint.sh
# since their action is not yet released under a stable version.
- name: Language
if: ${{ always() && github.event_name == 'pull_request' }}
working-directory: ./src/github.com/${{ github.repository }}/openshift
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
woke --output simple \
| reviewdog -efm="%f:%l:%c: %m" \
-name="woke" \
-reporter="github-pr-check" \
-filter-mode="added" \
-fail-on-error="true" \
-level="error"
- name: Prettify code
uses: creyD/[email protected]
with:
dry: true
prettier_options: -c openshift/**/*.{sh,yaml}