Skip to content

Commit d517f37

Browse files
Test Docker in CI (#1020)
* Test Docker in CI * Fix test * Fix test * Fix test
1 parent 89559c6 commit d517f37

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,40 @@ jobs:
100100
chmod u+x ./wasm/build-wasm.sh
101101
./wasm/build-wasm.sh
102102
103+
test_docker_build:
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v4
107+
108+
- uses: docker/setup-buildx-action@v3
109+
id: buildx
110+
with:
111+
install: true
112+
113+
- uses: docker/metadata-action@v5
114+
id: meta
115+
env:
116+
DOCKER_METADATA_PR_HEAD_SHA: "true"
117+
with:
118+
images: johnnymorganz/stylua
119+
tags: |
120+
type=sha
121+
122+
- uses: docker/build-push-action@v5
123+
with:
124+
load: true
125+
context: .
126+
file: Dockerfile
127+
builder: ${{ steps.buildx.outputs.name }}
128+
tags: ${{ steps.meta.outputs.tags }}
129+
labels: ${{ steps.meta.outputs.labels }}
130+
cache-from: type=gha
131+
cache-to: type=gha
132+
133+
- name: Test
134+
run: |
135+
docker run --rm ${{ steps.meta.outputs.tags }} /stylua --help
136+
103137
lint:
104138
runs-on: ubuntu-latest
105139
steps:

0 commit comments

Comments
 (0)