mirror of
https://github.com/Lissy93/dashy.git
synced 2024-11-24 14:08:30 +03:00
🐳 Attempts new multi-arch Docker action
This commit is contained in:
parent
24793c8108
commit
71325c7f3c
95
.github/workflows/docker-image.yml
vendored
95
.github/workflows/docker-image.yml
vendored
@ -1,35 +1,76 @@
|
||||
name: Build Multiplatform Image
|
||||
name: 🐳 Build + Publish Multi-Platform Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
branches: ['master']
|
||||
tags: [v*]
|
||||
|
||||
env:
|
||||
DH_IMAGE: ${{ secrets.DOCKER_REPO }}
|
||||
GH_IMAGE: ${{ github.repository_owner }}/{{ github.event.repository.name }}
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
permissions: { contents: read, packages: write }
|
||||
if: "!contains(github.event.head_commit.message, '[ci-skip]')"
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile-multi-arch
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_REPO }}:latest
|
||||
- name: 🛎️ Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: 🔖 Get App Version
|
||||
uses: tyankatsu0105/read-package-version-actions@v1
|
||||
id: package-version
|
||||
|
||||
|
||||
- name: 🗂️ Make Docker Meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: |
|
||||
${{ env.DH_IMAGE }}
|
||||
ghcr.io/${{ env.GH_IMAGE }}
|
||||
tags: |
|
||||
type=ref,event=tag,suffix={{tag}}
|
||||
type=semver,pattern={{raw}},value=${{ steps.package-version.outputs.version }},prefix=release-
|
||||
labels: |
|
||||
maintainer=Lissy93
|
||||
org.opencontainers.image.title=Dashy
|
||||
org.opencontainers.image.description=A self-hosted startpage for your server
|
||||
org.opencontainers.image.documentation=https://dashy.to/docs
|
||||
org.opencontainers.image.authors=Alicia Sykes
|
||||
org.opencontainers.image.licenses=MIT
|
||||
|
||||
- name: 🔧 Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: 🔧 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: 🔑 Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: 🔑 Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: ⚒️ Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
dockerfile: ./docker/Dockerfile-multi-arch
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.DH_IMAGE }}:latest
|
||||
${{ env.DH_IMAGE }}:${{ steps.package-version.outputs.version }}
|
||||
${{ env.GH_IMAGE }}:latest
|
||||
${{ env.GH_IMAGE }}:${{ steps.package-version.outputs.version }}
|
||||
|
Loading…
Reference in New Issue
Block a user