diff --git a/.github/workflows/docker_base.yaml b/.github/workflows/docker_base.yaml new file mode 100644 index 0000000..38af69d --- /dev/null +++ b/.github/workflows/docker_base.yaml @@ -0,0 +1,30 @@ +name: Update docker base +on: + push: + paths: + - docker_base/** + +jobs: + build: + name: Build docker base image + runs-on: ubuntu-22.04 + steps: + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.23.0 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 + + - name: Release to Docker Fitter Base + run: | + DOCKER_TAG=ghcr.io/pxyup/fitter_base:latest + docker buildx build --platform linux/arm64 -f ./docker_base/Dockerfile -t ${DOCKER_TAG} . + docker login ghcr.io --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.TOKEN }} && docker push ${DOCKER_TAG} diff --git a/Dockerfile b/Dockerfile index 7682de0..c89c92e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,4 @@ -FROM --platform=linux/arm64 arm64v8/golang:1.23 - -ENV GOARCH=arm64 -ENV GOOS=linux - -RUN go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps +FROM --platform=linux/arm64 ghcr.io/pxyup/fitter_base:latest WORKDIR /go/src/fitter_cli diff --git a/docker_base/Dockerfile b/docker_base/Dockerfile new file mode 100644 index 0000000..6ecd353 --- /dev/null +++ b/docker_base/Dockerfile @@ -0,0 +1,6 @@ +FROM --platform=linux/arm64 arm64v8/golang:1.23 + +ENV GOARCH=arm64 +ENV GOOS=linux + +RUN go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps \ No newline at end of file