playground/.forgejo/workflows/concurrency.yml

40 lines
No EOL
879 B
YAML

name: concurrency
on:
workflow_dispatch:
concurrency:
group: hello-world-${{ github.ref }}
cancel-in-progress: true
jobs:
hello-world-1:
runs-on: docker
container:
image: docker.io/alpine:3.21.2
concurrency: hello-world # same group with hello-world-2
steps:
- run: |
echo "Hello world 1!"
sleep 5
echo "Hello world 1 again!"
hello-world-2:
runs-on: docker
container:
image: docker.io/alpine:3.21.2
concurrency: hello-world # same group with hello-world-1
steps:
- run: |
echo "Hello world 2!"
sleep 5
echo "Hello world 2 again!"
hello-world-3:
runs-on: docker
container:
image: docker.io/alpine:3.21.2
steps:
- run: |
echo "Hello world 3!"
sleep 5
echo "Hello world 3 again, no waiting here!"