Skip to content

Commit

Permalink
ci: use running-workflow-name
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Jun 7, 2023
1 parent 649d42c commit a5d4816
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-dry-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
jobs:
dry-run:
runs-on: ubuntu-latest
name: dry-run
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'dry-run'
running-workflow-name: 'release/dry-run'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
wait-interval: 60
allowed-conclusions: success
ensure-tests:
runs-on: ubuntu-latest
Expand All @@ -30,7 +30,7 @@ jobs:
ref: ${{ github.ref }}
check-name: 'tests'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
wait-interval: 60
allowed-conclusions: success
ensure-tools:
runs-on: ubuntu-latest
Expand All @@ -39,15 +39,16 @@ jobs:
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'tools'
running-workflow-name: 'tools'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
wait-interval: 60
allowed-conclusions: success
publish:
runs-on: ubuntu-latest
needs:
- ensure-dry-run
- ensure-tests
- ensure-tools
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
Expand Down Expand Up @@ -105,3 +106,18 @@ jobs:
ref: refs/heads/master
workflow: akash
inputs: '{"tag": "${{ env.RELEASE_TAG }}"}'
dispatch-upgrade-test:
runs-on: ubuntu-latest
needs:
- publish
- homebrew
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: release version
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: benc-uk/workflow-dispatch@v1
with:
workflow: upgrade
inputs: '{"tag": "${{ env.RELEASE_TAG }}"}'
37 changes: 21 additions & 16 deletions .github/workflows/upgrades-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@ defaults:
shell: bash

on:
push:
tags:
- v*
workflow_dispatch:
inputs:
tag:

jobs:
ensure-release:
runs-on: ubuntu-latest
steps:
- name: Ensure release PASS
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'release'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
allowed-conclusions: success
test:
runs-on: upgrade-tester
needs:
Expand All @@ -33,11 +23,26 @@ jobs:
go-version: "${{ env.GOLANG_VERSION }}"
- name: configure variables
run: |
test_required=$(./script/upgrades.sh test-required ${{ github.ref }})
echo "RELEASE_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
test_required=$(./script/upgrades.sh test-required ${{ github.event.inputs.tag }})
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: run test
if: env.TEST_REQUIRED == 'true'
run: |
cd tests/upgrade
UPGRADE_BINARY_VERSION=${{ env.RELEASE_TAG }} make test
- name: dump stderr
if: always() && steps.test.outcome != 'skipped'
run: cat .cache/run/upgrade/stderr.log
- name: upload stderr
if: always() && steps.test.outcome != 'skipped'
uses: actions/upload-artifact@v3
with:
name: stderr.log
path: .cache/run/upgrade/stderr.log
- name: upload stdout
if: always() && steps.test.outcome != 'skipped'
uses: actions/upload-artifact@v3
with:
name: stdout.log
path: .cache/run/upgrade/stdout.log
3 changes: 3 additions & 0 deletions .github/workflows/upgrades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
run: |
cd tests/upgrade
make test
- name: dump stderr
if: always() && steps.test.outcome != 'skipped'
run: cat .cache/run/upgrade/stderr.log
- name: upload stderr
if: always() && steps.test.outcome != 'skipped'
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit a5d4816

Please sign in to comment.