mirror of
https://github.com/sern-handler/pocketbase
synced 2026-06-06 01:16:56 +00:00
feat: initial commit
This commit is contained in:
43
.github/workflows/publish.yml
vendored
Normal file
43
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Publish to Docker Hub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
- name: Get latest version
|
||||
run: |
|
||||
curl -s https://api.github.com/repos/pocketbase/pocketbase/releases/latest \
|
||||
| grep "tag_name" \
|
||||
| awk '{print $2}' \
|
||||
| tr -d '"' \
|
||||
| tr -d ',' \
|
||||
| tr -d 'v' \
|
||||
| tr -d ' ' \
|
||||
>> $VERSION
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
sernhandler/pocketbase:latest
|
||||
sernhandler/pocketbase:$VERSION
|
||||
build-args: |
|
||||
VERSION=$VERSION
|
||||
@@ -3,7 +3,9 @@
|
||||
FROM alpine:latest AS download
|
||||
|
||||
ARG VERSION
|
||||
ADD https://github.com/pocketbase/pocketbase/releases/download/v${VERSION}/pocketbase_${VERSION}_linux_amd64.zip /pb.zip
|
||||
ARG BUILDARCH
|
||||
|
||||
ADD https://github.com/pocketbase/pocketbase/releases/download/v${VERSION}/pocketbase_${VERSION}_linux_${BUILDARCH}.zip /pb.zip
|
||||
RUN unzip /pb.zip && chmod +x /pocketbase
|
||||
|
||||
FROM alpine
|
||||
|
||||
Reference in New Issue
Block a user