Skip to content

Commit b5ab7e0

Browse files
Merge pull request #276 from discordjs/main
Create a new pull request by comparing changes across two branches
2 parents 1dbae76 + 2c3bf5c commit b5ab7e0

File tree

276 files changed

+11352
-8509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+11352
-8509
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/cleanup-cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v6
1515

1616
- name: Cleanup caches
1717
run: |

.github/workflows/deploy-website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository_owner == 'discordjs'
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818

1919
- name: Install Node.js v24
2020
uses: actions/setup-node@v6

.github/workflows/deprecate-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
if: github.repository_owner == 'discordjs'
3737
steps:
3838
- name: Checkout repository
39-
uses: actions/checkout@v5
39+
uses: actions/checkout@v6
4040

4141
- name: Install Node.js v24
4242
uses: actions/setup-node@v6

.github/workflows/documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
if: github.repository_owner == 'discordjs'
3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v5
41+
uses: actions/checkout@v6
4242
with:
4343
ref: ${{ inputs.ref || '' }}
4444

@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Checkout main repository
5858
if: ${{ inputs.ref && inputs.ref != 'main' }}
59-
uses: actions/checkout@v5
59+
uses: actions/checkout@v6
6060
with:
6161
path: 'main'
6262

@@ -213,7 +213,7 @@ jobs:
213213
if: github.repository_owner == 'discordjs'
214214
steps:
215215
- name: Checkout repository
216-
uses: actions/checkout@v5
216+
uses: actions/checkout@v6
217217

218218
- name: Install Node.js v24
219219
uses: actions/setup-node@v6

.github/workflows/label-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: github.repository_owner == 'discordjs'
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: Label sync
2121
uses: crazy-max/ghaction-github-labeler@v5

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

Lines changed: 73 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,88 @@ on:
33
schedule:
44
- cron: '0 */12 * * *'
55
workflow_dispatch:
6+
env:
7+
IMAGE_NAME: discordjs/proxy
68
jobs:
7-
docker-publish:
8-
name: Docker publish
9-
runs-on: ubuntu-latest
10-
if: github.repository_owner == 'discordjs'
9+
build:
10+
name: Build ${{ matrix.platform }}
11+
runs-on: ${{ matrix.runner }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: linux/amd64
17+
runner: ubuntu-latest
18+
- platform: linux/arm64
19+
runner: ubuntu-24.04-arm
1120
steps:
21+
- name: Prepare
22+
run: |
23+
platform=${{ matrix.platform }}
24+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
25+
1226
- name: Checkout repository
13-
uses: actions/checkout@v5
27+
uses: actions/checkout@v6
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to DockerHub
33+
uses: docker/login-action@v3
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
1437

15-
- name: Install Node.js v24
16-
uses: actions/setup-node@v6
38+
- name: Build and push by digest
39+
id: build
40+
uses: docker/build-push-action@v6
1741
with:
18-
node-version: 24
19-
package-manager-cache: false
42+
context: .
43+
file: packages/proxy-container/Dockerfile
44+
platforms: ${{ matrix.platform }}
45+
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
2046

21-
- name: Install dependencies
22-
uses: ./packages/actions/src/pnpmCache
47+
- name: Export digest
48+
run: |
49+
mkdir -p /tmp/digests
50+
digest="${{ steps.build.outputs.digest }}"
51+
touch "/tmp/digests/${digest#sha256:}"
52+
53+
- name: Upload digest
54+
uses: actions/upload-artifact@v5
55+
with:
56+
name: digests-${{ env.PLATFORM_PAIR }}
57+
path: /tmp/digests/*
58+
if-no-files-found: error
59+
retention-days: 1
60+
61+
merge:
62+
name: Create and push manifest list
63+
runs-on: ubuntu-latest
64+
needs: build
65+
steps:
66+
- name: Download digests
67+
uses: actions/download-artifact@v6
68+
with:
69+
path: /tmp/digests
70+
pattern: digests-*
71+
merge-multiple: true
2372

2473
- name: Set up Docker Buildx
2574
uses: docker/setup-buildx-action@v3
2675

2776
- name: Login to DockerHub
28-
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
77+
uses: docker/login-action@v3
78+
with:
79+
username: ${{ secrets.DOCKER_USERNAME }}
80+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
81+
82+
- name: Create manifest list and push
83+
working-directory: /tmp/digests
84+
run: |
85+
docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest \
86+
$(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *)
2987
30-
- name: Build & push docker image
31-
run: docker build -f packages/proxy-container/Dockerfile -t discordjs/proxy:latest --push .
88+
- name: Inspect image
89+
run: |
90+
docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:latest

.github/workflows/publish-dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
private-key: ${{ secrets.DISCORDJS_APP_KEY_RELEASE }}
3535

3636
- name: Checkout repository
37-
uses: actions/checkout@v5
37+
uses: actions/checkout@v6
3838
with:
3939
fetch-depth: 0
4040
token: ${{ steps.app-token.outputs.token }}
@@ -55,7 +55,7 @@ jobs:
5555

5656
- name: Checkout main repository (non-main ref)
5757
if: ${{ inputs.ref != 'main' }}
58-
uses: actions/checkout@v5
58+
uses: actions/checkout@v6
5959
with:
6060
path: 'main'
6161

Lines changed: 83 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,98 @@
11
name: Publish docker images
22
on:
33
workflow_dispatch:
4+
env:
5+
IMAGE_NAME: discordjs/proxy
46
jobs:
5-
docker-publish:
6-
name: Docker publish
7-
runs-on: ubuntu-latest
7+
build:
8+
name: Build ${{ matrix.platform }}
9+
runs-on: ${{ matrix.runner }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- platform: linux/amd64
15+
runner: ubuntu-latest
16+
- platform: linux/arm64
17+
runner: ubuntu-24.04-arm
818
steps:
19+
- name: Prepare
20+
run: |
21+
platform=${{ matrix.platform }}
22+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
23+
924
- name: Checkout repository
10-
uses: actions/checkout@v5
25+
uses: actions/checkout@v6
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
1129

12-
- name: Install Node.js v24
13-
uses: actions/setup-node@v6
30+
- name: Login to DockerHub
31+
uses: docker/login-action@v3
32+
with:
33+
username: ${{ secrets.DOCKER_USERNAME }}
34+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
35+
36+
- name: Build and push by digest
37+
id: build
38+
uses: docker/build-push-action@v6
1439
with:
15-
node-version: 24
16-
package-manager-cache: false
40+
context: .
41+
file: packages/proxy-container/Dockerfile
42+
platforms: ${{ matrix.platform }}
43+
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
1744

18-
- name: Install dependencies
19-
uses: ./packages/actions/src/pnpmCache
45+
- name: Export digest
46+
run: |
47+
mkdir -p /tmp/digests
48+
digest="${{ steps.build.outputs.digest }}"
49+
touch "/tmp/digests/${digest#sha256:}"
50+
51+
- name: Upload digest
52+
uses: actions/upload-artifact@v5
53+
with:
54+
name: digests-${{ env.PLATFORM_PAIR }}
55+
path: /tmp/digests/*
56+
if-no-files-found: error
57+
retention-days: 1
58+
59+
merge:
60+
name: Create and push manifest list
61+
runs-on: ubuntu-latest
62+
needs: build
63+
steps:
64+
- name: Download digests
65+
uses: actions/download-artifact@v6
66+
with:
67+
path: /tmp/digests
68+
pattern: digests-*
69+
merge-multiple: true
70+
71+
- name: Checkout repository
72+
uses: actions/checkout@v6
73+
74+
- name: Get Major Version
75+
id: version
76+
run: |
77+
FULL_VER=$(jq --raw-output '.version' packages/proxy-container/package.json)
78+
MAJOR=$(echo $FULL_VER | cut -d '.' -f1)
79+
echo "major=$MAJOR" >> $GITHUB_OUTPUT
2080
2181
- name: Set up Docker Buildx
2282
uses: docker/setup-buildx-action@v3
2383

2484
- name: Login to DockerHub
25-
run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
85+
uses: docker/login-action@v3
86+
with:
87+
username: ${{ secrets.DOCKER_USERNAME }}
88+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
89+
90+
- name: Create manifest list and push
91+
working-directory: /tmp/digests
92+
run: |
93+
docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:${{ steps.version.outputs.major }} \
94+
$(printf '${{ env.IMAGE_NAME }}@sha256:%s ' *)
2695
27-
- name: Build & push docker image
28-
run: docker build -f packages/proxy-container/Dockerfile -t discordjs/proxy:$(cut -d '.' -f1 <<< $(jq --raw-output '.version' packages/proxy-container/package.json)) --push .
96+
- name: Inspect image
97+
run: |
98+
docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.version.outputs.major }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
permission-contents: write
5656

5757
- name: Checkout repository
58-
uses: actions/checkout@v5
58+
uses: actions/checkout@v6
5959
with:
6060
token: ${{ steps.app-token.outputs.token }}
6161
ref: ${{ inputs.ref || '' }}
@@ -75,7 +75,7 @@ jobs:
7575

7676
- name: Checkout main repository
7777
if: ${{ inputs.ref && inputs.ref != 'main' }}
78-
uses: actions/checkout@v5
78+
uses: actions/checkout@v6
7979
with:
8080
path: 'main'
8181

0 commit comments

Comments
 (0)