refactor(actions): update to v2 of build-push-action & push arm image
This commit is contained in:
parent
aa611fa6ba
commit
9dcc16277e
2 changed files with 62 additions and 18 deletions
41
.github/workflows/docker-arm.yml
vendored
Normal file
41
.github/workflows/docker-arm.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
name: 'CD: Push ARM64 Docker Images'
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ trunk ]
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'server/**'
|
||||||
|
- 'prisma/**'
|
||||||
|
- '.github/**'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
push_to_ghcr:
|
||||||
|
name: Push Image to GitHub Packages
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to Github Packages
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build Docker Image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: Dockerfile-arm
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/diced/zipline/arm:trunk
|
39
.github/workflows/docker.yml
vendored
39
.github/workflows/docker.yml
vendored
|
@ -18,28 +18,31 @@ jobs:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Push to GitHub Packages
|
- name: Setup QEMU
|
||||||
uses: docker/build-push-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to Github Packages
|
||||||
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
registry: docker.pkg.github.com
|
|
||||||
repository: diced/zipline/zipline
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
tag_with_ref: true
|
|
||||||
|
|
||||||
push_to_dockerhub:
|
- name: Login to Docker Hub
|
||||||
name: Push Image to Docker Hub
|
uses: docker/login-action@v1
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out the repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Push to Docker Hub
|
|
||||||
uses: docker/build-push-action@v1
|
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
repository: diced/zipline
|
|
||||||
dockerfile: Dockerfile
|
- name: Build Docker Image
|
||||||
tag_with_ref: true
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
ghcr.io/diced/zipline/zipline:trunk
|
||||||
|
ghcr.io/diced/zipline/amd64:trunk
|
||||||
|
diced/zipline:trunk
|
Loading…
Reference in a new issue