Skip to content

Upgrade provision-cluster to latest #192

Upgrade provision-cluster to latest

Upgrade provision-cluster to latest #192

Workflow file for this run

name: "License verification"
on:
pull_request:
jobs:
dependency_info_linux:
name: "Verify use of forbidden licenses"
runs-on: ubuntu-latest
outputs:
is-up-to-date: ${{ steps.check.outputs.up-to-date }}
diff: ${{ steps.check.outputs.diff }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: "${{ github.event.pull_request.head.sha }}"
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: "Generate dependency information"
shell: bash
run: make generate
- name: "Save dependency changes if committer is dependabot"
uses: datawire/go-mkopensource/actions/save-dependabot-changes@v0.0.7
id: changed-by-dependabot
with:
branches_to_skip: master
- name: "Abort if dependabot triggered a dependency update"
if: steps.changed-by-dependabot.outputs.is_dirty == 'true'
run: |
echo "Dependabot triggered a dependency update. Aborting workflow."
exit 1
- name: "Check dependency files are up-to-date"
id: check
shell: bash
run: |
set -e
git add .
if [[ -n "$(git status --porcelain)" ]]; then
echo '::set-output name=diff::'$(PAGER= git diff --cached 2>&1 | base64 -w0)
echo "::set-output name=up-to-date::no"
else
echo "::set-output name=up-to-date::yes"
fi
up_to_date_check_linux:
name: "Check out-of-date licenses"
needs: dependency_info_linux
runs-on: ubuntu-latest
steps:
- name: "Check dependency files are up-to-date"
shell: bash
run: |
set -e
if [[ "${{needs.dependency_info_linux.outputs.is-up-to-date}}" == "no" ]]; then
echo '::error:: Changes detected after dependency generation. Run ' \
'`make generate` and commit the latest version of the ' \
'dependency information files'
echo ${{needs.dependency_info_linux.outputs.diff}} | base64 -d
exit 1
fi
echo '::info:: Files are up-to-date'