Skip to content

Commit c0a208d

Browse files
committed
Allow using environments
1 parent d0bc499 commit c0a208d

22 files changed

Lines changed: 167 additions & 13 deletions

.github/workflows/approve-sync-files.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
required: false
88
type: string
99
default: "ubuntu-latest"
10+
environment:
11+
description: "Environment to use"
12+
required: false
13+
type: string
1014
secrets:
1115
sync-token:
1216
description: "Token used to approve & merge"
@@ -17,6 +21,10 @@ jobs:
1721
name: Auto approve synced files
1822
if: contains(github.event.pull_request.title, 'Synced file(s)') && github.actor == 'couchoud-t' && github.event.pull_request.base.ref == github.event.repository.default_branch
1923
runs-on: [ "${{ inputs.runs-on }}" ]
24+
environment: ${{ inputs.environment }}
25+
concurrency:
26+
group: approve-sync-${{ github.ref }}
27+
cancel-in-progress: true
2028
steps:
2129
- name: Approve Pull Request
2230
uses: hmarr/auto-approve-action@v4.0.0

.github/workflows/docker-output-publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
required: false
3131
type: string
3232
default: "ubuntu-latest"
33+
environment:
34+
description: "Environment to use"
35+
required: false
36+
type: string
3337
secrets:
3438
docker-repo:
3539
description: "Docker registry to push to"
@@ -49,7 +53,10 @@ jobs:
4953
publish:
5054
name: Docker - Publish
5155
runs-on: [ "${{ inputs.runs-on }}" ]
52-
concurrency: docker-${{ inputs.docker-tag }}
56+
environment: ${{ inputs.environment }}
57+
concurrency:
58+
group: docker-publish-${{ inputs.docker-tag }}
59+
cancel-in-progress: true
5360
outputs:
5461
digest: ${{ steps.docker_build.outputs.digest }}
5562
steps:

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ jobs:
6969
publish:
7070
name: Docker - Publish
7171
runs-on: [ "${{ inputs.runs-on }}" ]
72-
concurrency: docker-${{ inputs.docker-extra-tag }}
72+
concurrency:
73+
group: docker-publish-${{ inputs.docker-extra-tag }}
74+
cancel-in-progress: true
7375
environment:
7476
name: ${{ inputs.environment }}
7577
url: ${{ inputs.environment-url }}

.github/workflows/dropbox-publish-artifact.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ jobs:
3838
publish:
3939
name: Dropbox - Publish
4040
runs-on: [ "${{ inputs.runs-on }}" ]
41-
concurrency: dropbox-${{ inputs.target }}
4241
environment: ${{ inputs.environment }}
42+
concurrency:
43+
group: dropbox-${{ github.ref }}-${{ inputs.target }}
44+
cancel-in-progress: true
4345
steps:
4446
- uses: actions/download-artifact@v5.0.0
4547
name: Download artifact

.github/workflows/gradle-build-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ on:
3232
required: false
3333
type: boolean
3434
default: false
35+
environment:
36+
description: "Environment to use"
37+
required: false
38+
type: string
3539
secrets:
3640
codecov-token:
3741
description: "Token to upload reports on Codecov"
@@ -45,6 +49,10 @@ jobs:
4549
build:
4650
name: Gradle - Build
4751
runs-on: [ "${{ inputs.runs-on }}" ]
52+
environment: ${{ inputs.environment }}
53+
concurrency:
54+
group: gradle-build-${{ github.ref }}
55+
cancel-in-progress: true
4856
steps:
4957
- name: Checkout source
5058
uses: actions/checkout@v5.0.0
@@ -76,6 +84,10 @@ jobs:
7684
tests:
7785
name: Gradle - Tests
7886
runs-on: [ "${{ inputs.runs-on }}" ]
87+
environment: ${{ inputs.environment }}
88+
concurrency:
89+
group: gradle-test-${{ github.ref }}
90+
cancel-in-progress: true
7991
steps:
8092
- name: Checkout source
8193
uses: actions/checkout@v5.0.0

.github/workflows/gradle-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
build:
3131
name: Gradle - Build
3232
runs-on: [ "${{ inputs.runs-on }}" ]
33+
concurrency:
34+
group: gradle-build-${{ github.ref }}
35+
cancel-in-progress: true
3336
steps:
3437
- name: Checkout source
3538
uses: actions/checkout@v5.0.0

.github/workflows/gradle-jib-publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ on:
2626
required: false
2727
type: string
2828
default: "ubuntu-latest"
29+
environment:
30+
description: "Environment to use"
31+
required: false
32+
type: string
2933
secrets:
3034
jib-extra-params:
3135
description: "Extra jib parameters"
@@ -44,7 +48,10 @@ jobs:
4448
publish:
4549
name: Gradle - Publish Docker
4650
runs-on: [ "${{ inputs.runs-on }}" ]
47-
concurrency: docker-${{ inputs.docker-tag }}
51+
environment: ${{ inputs.environment }}
52+
concurrency:
53+
group: docker-publish-${{ inputs.docker-tag }}
54+
cancel-in-progress: true
4855
steps:
4956
- name: Checkout source
5057
uses: actions/checkout@v5.0.0

.github/workflows/gradle-ktor-publish.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ on:
2626
required: false
2727
type: string
2828
default: "ubuntu-latest"
29+
environment:
30+
description: "Environment to use"
31+
required: false
32+
type: string
2933
secrets:
3034
ktor-extra-params:
3135
description: "Extra jib parameters"
@@ -44,7 +48,10 @@ jobs:
4448
publish:
4549
name: Gradle - Publish Docker
4650
runs-on: [ "${{ inputs.runs-on }}" ]
47-
concurrency: docker-${{ inputs.docker-tag }}
51+
environment: ${{ inputs.environment }}
52+
concurrency:
53+
group: docker-publish-${{ inputs.docker-tag }}
54+
cancel-in-progress: true
4855
steps:
4956
- name: Checkout source
5057
uses: actions/checkout@v5.0.0

.github/workflows/gradle-minecraft-build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
required: false
1818
type: string
1919
default: "ubuntu-latest"
20+
environment:
21+
description: "Environment to use"
22+
required: false
23+
type: string
2024

2125
permissions:
2226
contents: write
@@ -25,6 +29,10 @@ jobs:
2529
build:
2630
name: Gradle - Build
2731
runs-on: [ "${{ inputs.runs-on }}" ]
32+
environment: ${{ inputs.environment }}
33+
concurrency:
34+
group: gradle-build-${{ github.ref }}
35+
cancel-in-progress: true
2836
steps:
2937
- name: Checkout source
3038
uses: actions/checkout@v5.0.0

.github/workflows/gradle-minecraft-publish.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
required: false
1818
type: string
1919
default: "ubuntu-latest"
20+
environment:
21+
description: "Environment to use"
22+
required: false
23+
type: string
2024
secrets:
2125
curseforge-token:
2226
required: true
@@ -27,7 +31,10 @@ jobs:
2731
publish-curseforge:
2832
name: Gradle - Publish - Curseforge
2933
runs-on: [ "${{ inputs.runs-on }}" ]
30-
concurrency: publish-curseforge
34+
environment: ${{ inputs.environment }}
35+
concurrency:
36+
group: publish-curseforge
37+
cancel-in-progress: false
3138
steps:
3239
- name: Checkout source
3340
uses: actions/checkout@v5.0.0
@@ -60,7 +67,10 @@ jobs:
6067
publish-modrinth:
6168
name: Gradle - Publish - Modrinth
6269
runs-on: ubuntu-latest
63-
concurrency: publish-modrinth
70+
environment: ${{ inputs.environment }}
71+
concurrency:
72+
group: publish-modrinth
73+
cancel-in-progress: false
6474
steps:
6575
- name: Checkout source
6676
uses: actions/checkout@v5.0.0

0 commit comments

Comments
 (0)