File tree 4 files changed +66
-2
lines changed
4 files changed +66
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker Image
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *' # Push events to matching tags
7
+
8
+ env :
9
+ REGISTRY : docker.io
10
+ IMAGE_NAME : lessapi/base-env-ubuntu-playwright-go
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+
16
+ permissions :
17
+ contents : read
18
+ packages : write
19
+
20
+ steps :
21
+ - name : Read Tag
22
+ id : read_tag
23
+ run : echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
24
+
25
+ - name : Checkout repository
26
+ uses : actions/checkout@v4
27
+
28
+ - name : Log in to the Container registry
29
+ uses : docker/login-action@v3
30
+ with :
31
+ registry : ${{ env.REGISTRY }}
32
+ username : ${{ secrets.LESSAPI_DOCKER_HUB_USERNAME }}
33
+ password : ${{ secrets.LESSAPI_DOCKER_HUB_ACCESS_TOKEN }}
34
+
35
+ - name : Extract metadata (tags, labels) for Docker
36
+ id : meta
37
+ uses : docker/metadata-action@v5
38
+ with :
39
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40
+
41
+ - name : Build and push Docker image
42
+ uses : docker/build-push-action@v5
43
+ with :
44
+ context : .
45
+ push : true
46
+ tags : ${{ steps.meta.outputs.tags }}
47
+ labels : ${{ steps.meta.outputs.labels }}
48
+
49
+ - name : Logout from DockerHub
50
+ run : docker logout
Original file line number Diff line number Diff line change
1
+ /.idea
Original file line number Diff line number Diff line change
1
+ FROM golang:1.21 as builder
2
+ RUN PLAYWRIGHT_GO_VERSION="0.4201.1" \
3
+ && go install github.com/playwright-community/playwright-go/cmd/playwright@${PLAYWRIGHT_GO_VERSION}
4
+
5
+ FROM ubuntu:jammy
6
+ COPY --from=builder /go/bin/playwright /
7
+ RUN apt-get update && apt-get install -y ca-certificates tzdata \
8
+ && /playwright install --with-deps chromium \
9
+ && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change 1
- # ubuntu-playwright-go-env
2
- ubuntu docker image with playwright-go & ; dependencies
1
+ # base-env-ubuntu-playwright-go
2
+
3
+ ## Description
4
+
5
+ This is a base environment for running playwright-go.
6
+ It is based on the official Ubuntu image and includes Chromium.
You can’t perform that action at this time.
0 commit comments