Skip to content

Test No status

Test No status #50

Workflow file for this run

name: Test No status
on:
# # Uncomment when test added first time to register workflow and comment it back after workflow would be registered
# #
# # Added pull_request to register workflow from the PR.
# # Read more https://stackoverflow.com/questions/63362126/github-actions-how-to-run-a-workflow-created-on-a-non-master-branch-from-the-wo
# pull_request: {}
workflow_dispatch:
inputs:
ref:
description: "The fully-formed ref of the branch or tag that triggered the workflow run"
required: false
type: "string"
sha:
description: "The sha of the commit that triggered the workflow run"
required: false
type: "string"
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Setup
run: echo "Do setup"
- id: random
shell: bash
run: |-
echo "password=$(echo $RANDOM | md5sum | head -c 20)" >> $GITHUB_OUTPUT
echo "environment=$(echo $RANDOM | md5sum | head -c 20)" >> $GITHUB_OUTPUT
outputs:
random: ${{ steps.random.outputs.password }}
environment: ${{ steps.random.outputs.environment }}
test:
runs-on: ubuntu-latest
continue-on-error: true
needs: [setup]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./
id: current
with:
repository: ${{ github.repository }}
sha: ${{ github.sha }}
status: continuous-delivery/${{ needs.setup.outputs.environment }}.test-app
expected_state: "success"
token: ${{ github.token }}
outputs:
status: ${{ steps.current.outcome }}
assert:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: nick-fields/assert-action@v1
with:
expected: "failure"
actual: "${{ needs.test.outputs.status }}"
teardown:
runs-on: ubuntu-latest
needs: [assert]
if: ${{ always() }}
steps:
- name: Tear down
run: echo "Do Tear down"