Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:whale: Attempts new multi-arch Docker action

Alicia Sykes71325c7f3ce1
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index b821b5f5..5583f9b8 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -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 }}
+
\ No newline at end of file