Skip to content

Commit

Permalink
ci: udpate badge
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and laurentsenta committed Jul 26, 2023
1 parent a462b4d commit 3c5f761
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/update-badge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Note: this workflow requires the repository to give Write access to Github Workflows.
# in Settings > Actions > General > Workflow permissions
name: Update Badge

on:
Expand All @@ -6,9 +8,8 @@ on:
- Test Production (e2e)
types:
- completed
# branches:
# - main
# - feat/text-production-gateways # temporary
branches:
- main

defaults:
run:
Expand All @@ -23,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: pl-strflt/job-summary-url-action@v1
name: metadata
id: metadata
with:
workflow: test-prod-e2e.yml # ${{ github.event.workflow.path }}
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -35,14 +36,16 @@ jobs:
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- run: |
GITHUB_JOB_SUMMARY_URL="${{ steps.metadata.outputs.job_summary_url }}"
echo GITHUB_JOB_SUMMARY_URL=${GITHUB_JOB_SUMMARY_URL}
IN='[![Conformance Production Dashboard](https://github.com/ipfs/gateway-conformance/actions/workflows/test-prod-e2e.yml/badge.svg?branch=master)](.*)'
ESCAPED_IN=$(printf '%s\n' "$IN" | sed -e 's/[][\/!&]/\\&/g')
OUT="[![Conformance Production Dashboard](https://github.com/ipfs/gateway-conformance/actions/workflows/test-prod-e2e.yml/badge.svg?branch=master)](${GITHUB_JOB_SUMMARY_URL})"
sed -i "s;${ESCAPED_IN};${OUT};" README.md
env:
GITHUB_JOB_SUMMARY_URL: ${{ steps.metadata.outputs.job_summary_url }}
REPOSITORY: ${{ github.repository }}
- run: |
if [[ -n $(git diff --shortstat 2> /dev/null | tail -n1) ]]; then
echo "GIT_DIRTY=1" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`gateway-conformance` is a tool designed to test if an IPFS Gateway implementation complies with the IPFS Gateway Specification correctly. The tool is distributed as a Docker image, as well as a GitHub Action(s).

[![Conformance Production Dashboard](https://github.com/ipfs/gateway-conformance/actions/workflows/test-prod-e2e.yml/badge.svg?branch=master)](something-something)
[![Conformance Production Dashboard](https://github.com/ipfs/gateway-conformance/actions/workflows/test-prod-e2e.yml/badge.svg?branch=master)]()

## Table of Contents

Expand Down

0 comments on commit 3c5f761

Please sign in to comment.