Skip to content

Commit

Permalink
chore: remove vips
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldino Kemal authored and Aldino Kemal committed Apr 19, 2024
1 parent bd0369e commit 0ca4a82
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 31 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
environment: production
steps:
- uses: actions/checkout@v4
- name: Ubuntu update package
run: |
sudo apt -y update
sudo apt -y install libvips-dev
- name: Golang Installation
uses: actions/setup-go@v4
with:
Expand All @@ -39,10 +35,6 @@ jobs:
environment: production
steps:
- uses: actions/checkout@v4
- name: Ubuntu update package
run: |
sudo apt -y update
sudo apt -y install libvips-dev
- name: Golang Installation
uses: actions/setup-go@v4
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
environment: production
steps:
- uses: actions/checkout@v4
- name: Install libvips
run: |
brew install vips
- name: Golang Installation
uses: actions/setup-go@v4
with:
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,12 @@ jobs:
environment: production
steps:
- uses: actions/checkout@v4
- name: Install pkgconfig
uses: crazy-max/ghaction-chocolatey@v3
with:
ref: ${{ github.ref_name }}
args: install pkgconfiglite --allow-empty-checksums
- name: Vips download
run: curl -LO https://github.com/libvips/build-win64-mxe/releases/download/v8.12.0/vips-dev-w64-all-8.12.0.zip
- name: Vips Extract
run: |
7z x .\vips-dev-w64-all-8.12.0.zip
- name: Vips add to path
shell: pwsh
run: |
Copy-Item -Path ${{ github.workspace }}\vips-dev-8.12\lib\pkgconfig\* -Destination C:/Strawberry/c/lib/pkgconfig -force -recurse
Copy-Item -Path ${{ github.workspace }}\vips-dev-8.12\bin\* -Destination C:/Strawberry/c/bin -force -recurse
Copy-Item -Path ${{ github.workspace }}\vips-dev-8.12\include\* -Destination C:/Strawberry/c/include -force -recurse
- name: Golang Installation
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Golang build
run: |
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";${{ github.workspace }}\vips-dev-8.12\bin")
[Environment]::SetEnvironmentVariable("PKG_CONFIG_PATH", "${{ github.workspace }}\vips-dev-8.12\lib\pkgconfig")
cd src && go build -o windows-amd64.exe
- name: Deploy artifact to release ${{ github.ref_name }}
uses: AButler/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions docker/golang.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# STEP 1 build executable binary
############################
FROM golang:1.21.5-alpine3.19 AS builder
RUN apk update && apk add --no-cache vips-dev gcc musl-dev gcompat ffmpeg
RUN apk update && apk add --no-cache gcc musl-dev gcompat
WORKDIR /whatsapp
COPY ./src .

Expand All @@ -15,7 +15,7 @@ RUN go build -o /app/whatsapp
## STEP 2 build a smaller image
#############################
FROM alpine:3.19
RUN apk update && apk add --no-cache vips-dev ffmpeg
RUN apk update && apk add --no-cache ffmpeg
WORKDIR /app
# Copy compiled from builder.
COPY --from=builder /app/whatsapp /app/whatsapp
Expand Down

0 comments on commit 0ca4a82

Please sign in to comment.