2022-07-12 23:32:52 -05:00
|
|
|
name: 'Push Release Docker Images'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
|
|
|
paths:
|
|
|
|
- 'src/**'
|
|
|
|
- 'server/**'
|
|
|
|
- 'prisma/**'
|
|
|
|
- '.github/**'
|
|
|
|
- 'Dockerfile'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
push_to_ghcr:
|
|
|
|
name: Push Release Image to GitHub Packages
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out the repo
|
2022-10-28 23:01:02 -05:00
|
|
|
uses: actions/checkout@v3
|
2022-07-12 23:32:52 -05:00
|
|
|
|
|
|
|
- name: Get version
|
2022-10-28 23:14:34 -05:00
|
|
|
id: version
|
2022-10-28 22:57:01 -05:00
|
|
|
run: |
|
2022-10-28 23:09:41 -05:00
|
|
|
echo "zipline_version=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
|
2022-07-12 23:32:52 -05:00
|
|
|
|
|
|
|
- name: Setup QEMU
|
2022-10-28 22:53:13 -05:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-07-12 23:32:52 -05:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-10-28 22:53:13 -05:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-07-12 23:32:52 -05:00
|
|
|
|
|
|
|
- name: Login to Github Packages
|
2022-10-28 22:53:13 -05:00
|
|
|
uses: docker/login-action@v2
|
2022-07-12 23:32:52 -05:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build Docker Image
|
2022-10-28 22:53:13 -05:00
|
|
|
uses: docker/build-push-action@v3
|
2022-07-12 23:32:52 -05:00
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
tags: |
|
|
|
|
ghcr.io/diced/zipline:latest
|
2022-10-28 23:09:41 -05:00
|
|
|
ghcr.io/diced/zipline:${{ steps.version.outputs.zipline_version }}
|
2022-10-28 22:44:43 -05:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|