👻 use build args for the tags on core.Dockerfile (#127) #380
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: 'Run windup integration tests' | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
jobs: | |
run-windup-test: | |
name: Run windup tests | |
runs-on: ubuntu-20.04 | |
permissions: write-all | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Extract pull request number from PR description | |
id: extract_analyzer_pull_request_number | |
run: | | |
PULL_REQUEST_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -oP '[A|a]nalyzer.?[P|p][R|r]: \K\d+' || true) | |
if [ -z "$PULL_REQUEST_NUMBER" ]; then | |
echo "::set-output name=ref::main" | |
else | |
echo "::set-output name=ref::refs/pull/$PULL_REQUEST_NUMBER/merge" | |
fi | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Checkout tools repo | |
uses: actions/checkout@v3 | |
with: | |
repository: konveyor/analyzer-lsp | |
path: analyzer-lsp | |
ref: "${{ steps.extract_analyzer_pull_request_number.outputs.ref }}" | |
- name: build analyzer-lsp Dockerfile | |
run: docker build -f analyzer-lsp/Dockerfile -t analyzer-lsp analyzer-lsp | |
- name: build shim Dockerfile | |
run: docker build -f Dockerfile -t testing . | |
- name: Run windup tests | |
id: run-windup-test | |
run: > | |
mkdir -p artifacts && | |
(docker run testing test /windup-rulesets/rules/rules-reviewed/ | tee output.log) && | |
tail -n1 output.log > artifacts/message.md && | |
echo "pass_rate=\"$(cat artifacts/message.md)\"" >> $GITHUB_ENV | |
- name: Save PR message as artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: pr_message | |
path: artifacts | |
- name: Update pass rate badge | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: RubbaBoy/BYOB@v1.3.0 | |
with: | |
NAME: windup-pass-rate | |
LABEL: 'Current status' | |
STATUS: ${{ env.pass_rate }} | |
COLOR: blue | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |