Skip to content

Commit bd77b83

Browse files
committed
update CI
1 parent 0e0de95 commit bd77b83

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

template/.github/workflows/ci.yaml.jinja

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ permissions:
1515
contents: write # needed for mutex
1616

1717
jobs:
18-
lint:
18+
get-values:
19+
uses: ./.github/workflows/get-values.yaml
20+
21+
pre-commit:
22+
needs: [ get-values ]
1923
name: Pre-commit
2024
runs-on: {% endraw %}{{ gha_linux_runner }}{% raw %}
2125
steps:
@@ -161,10 +165,24 @@ jobs:
161165

162166
required-check:
163167
runs-on: {% endraw %}{{ gha_linux_runner }}{% raw %}
164-
needs: [ test{% endraw %}{% if create_docs %}, build-docs{% endif %}{% if is_frozen_executable %}, executable{% endif %}{% raw %} ]
168+
needs:
169+
- test
170+
- get-values{% endraw %}{% if create_docs %}
171+
- build-docs{% endif %}{% if is_frozen_executable %}
172+
- executable{% endif %}{% raw %}
165173
if: always()
166174
steps:
167175
- name: fail if prior job failure
168176
if: needs.test.result != 'success'{% endraw %}{% if create_docs %} || needs.build-docs.result != 'success'{% endif %}{% if is_frozen_executable %} || needs.executable.result != 'success'{% endif %}{% raw %}
169177
run: |
170-
exit 1{% endraw %}
178+
exit 1
179+
- name: Mark updated Dependabot commit of devcontainer hash as succeeded
180+
if: needs.get-values.outputs.dependabot-commit-created == 'true'
181+
env:
182+
GH_TOKEN: ${{ github.token }}
183+
run: |
184+
gh api \
185+
-X POST -H "Accept: application/vnd.github.v3+json" \
186+
"/repos/${{ github.repository }}/statuses/${{ needs.get-values.outputs.new-dependabot-sha }}" \
187+
-f state=success -f context="required-check" -f description="Initial CI run passed" \
188+
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"{% endraw %}

0 commit comments

Comments
 (0)