Skip to content

Commit 6466574

Browse files
committed
feat(devcontainer): add postCreateCommand for Prettier installation
* Added `postCreateCommand` to install Prettier and related plugins. * Ensures that the development environment is set up with necessary tools.
1 parent ea39c22 commit 6466574

File tree

2 files changed

+51
-50
lines changed

2 files changed

+51
-50
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
"yzhang.markdown-all-in-one"
2424
]
2525
}
26-
}
26+
},
27+
"postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template"
2728
}

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

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,54 @@ on:
1111

1212
jobs:
1313
build-ubuntu-2404:
14-
name: Build Ubuntu 24.04
15-
runs-on: ubuntu-latest
16-
permissions:
17-
packages: write
18-
contents: read
19-
attestations: write
20-
id-token: write
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v5
24-
25-
- name: Setup QEMU
26-
uses: docker/setup-qemu-action@v3
27-
28-
- name: Login to Docker Hub
29-
uses: docker/login-action@v3
30-
with:
31-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
32-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
33-
34-
- name: Login to GitHub Container Registry
35-
uses: docker/login-action@v3
36-
with:
37-
registry: ghcr.io
38-
username: ${{ github.actor }}
39-
password: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Extract metadata (tags, labels) for Docker
42-
id: meta
43-
uses: docker/metadata-action@v5
44-
with:
45-
images: |
46-
gameservermanagers/steamcmd
47-
ghcr.io/gameservermanagers/steamcmd
48-
tags: |
49-
latest
50-
ubuntu
51-
ubuntu-24.04
52-
53-
- name: Build and push (Ubuntu 24.04)
54-
uses: docker/build-push-action@v6
55-
with:
56-
context: .
57-
file: ./Dockerfile.ubuntu-2404
58-
platforms: linux/amd64
59-
push: true
60-
tags: ${{ steps.meta.outputs.tags }}
61-
labels: ${{ steps.meta.outputs.labels }}
14+
name: Build Ubuntu 24.04
15+
runs-on: ubuntu-latest
16+
permissions:
17+
packages: write
18+
contents: read
19+
attestations: write
20+
id-token: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
25+
- name: Setup QEMU
26+
uses: docker/setup-qemu-action@v3
27+
28+
- name: Login to Docker Hub
29+
uses: docker/login-action@v3
30+
with:
31+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
32+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
33+
34+
- name: Login to GitHub Container Registry
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Extract metadata (tags, labels) for Docker
42+
id: meta
43+
uses: docker/metadata-action@v5
44+
with:
45+
images: |
46+
gameservermanagers/steamcmd
47+
ghcr.io/gameservermanagers/steamcmd
48+
tags: |
49+
latest
50+
ubuntu
51+
ubuntu-24.04
52+
53+
- name: Build and push (Ubuntu 24.04)
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
file: ./Dockerfile.ubuntu-2404
58+
platforms: linux/amd64
59+
push: true
60+
tags: ${{ steps.meta.outputs.tags }}
61+
labels: ${{ steps.meta.outputs.labels }}
6262

6363
build-ubuntu-2204:
6464
name: Build Ubuntu 22.04
@@ -158,7 +158,7 @@ jobs:
158158

159159
package-cleanup:
160160
name: Cleanup Old GitHub Packages
161-
needs: [ build-ubuntu-2004, build-ubuntu-2204, build-ubuntu-2404 ]
161+
needs: [build-ubuntu-2004, build-ubuntu-2204, build-ubuntu-2404]
162162
runs-on: ubuntu-latest
163163
steps:
164164
- name: Delete Package Versions

0 commit comments

Comments
 (0)