-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 1.21 KB
/
examples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Run the examples against the (just deployed) live environment
name: Examples
on:
workflow_call:
pull_request:
paths:
- 'docs/examples/**'
- '.github/workflows/examples.yaml'
permissions:
packages: write
contents: read
jobs:
poetry:
name: Poetry
runs-on: ubuntu-latest
timeout-minutes: 2
env:
# pyoci.com scales down to 0 replicas
# allow a longer request time if a cold start is needed
POETRY_REQUESTS_TIMEOUT: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: extractions/setup-just@v2
- run: pip install poetry
- name: Version
id: version
run: |
echo "VERSION=0.0.1+example-${{ github.run_attempt }}-poetry-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Publish
run: |
just examples poetry-publish "${{ steps.version.outputs.VERSION }}" "${{ github.actor }}" "${{ secrets.GITHUB_TOKEN }}" "https://pyoci.com/ghcr.io/allexveldman/"
- name: Install
run: |
just examples poetry-install "${{ steps.version.outputs.VERSION }}" "${{ github.actor }}" "${{ secrets.GITHUB_TOKEN }}" "https://pyoci.com/ghcr.io/allexveldman/"