zipline/.github/workflows/docker.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

2022-07-12 23:32:52 -05:00
name: 'Push Docker Images'
2021-06-23 13:20:20 -05:00
on:
push:
branches: [ trunk ]
2021-06-23 13:47:05 -05:00
paths:
- 'src/**'
- 'server/**'
- 'prisma/**'
- '.github/**'
- 'Dockerfile'
2021-06-23 13:20:20 -05:00
workflow_dispatch:
jobs:
push_to_ghcr:
name: Push 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
2021-06-23 13:20:20 -05:00
- name: Get version
2022-10-28 23:08:40 -05:00
id: version
2022-10-28 22:57:01 -05:00
run: |
2022-10-28 23:08:40 -05:00
echo "zipline_version=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
- name: Setup QEMU
2022-10-28 22:53:13 -05:00
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
2022-10-28 22:53:13 -05:00
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
2022-10-28 22:53:13 -05:00
uses: docker/login-action@v2
2021-06-23 13:20:20 -05:00
with:
registry: ghcr.io
2021-06-23 13:20:20 -05:00
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image
2022-10-28 21:37:09 -05:00
uses: docker/build-push-action@v3
with:
push: true
2022-06-21 00:43:21 -05:00
platforms: linux/amd64,linux/arm64
tags: |
2022-07-12 23:32:52 -05:00
ghcr.io/diced/zipline:trunk
2022-10-28 23:08:40 -05:00
ghcr.io/diced/zipline:trunk-${{ steps.version.outputs.zipline_version }}
2022-10-28 21:37:09 -05:00
cache-from: type=gha
cache-to: type=gha,mode=max