Skip to content

Commit

Permalink
add back github docker workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
poeti8 committed Jan 8, 2025
1 parent 0d4ebea commit d78e256
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker-build-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: docker-build-latest

env:
dockerhub_repository: "kutt/kutt"
dockerhub_tag: "main"

on:
push:
branches:
- main

jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
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.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ env.dockerhub_repository }}:${{ env.dockerhub_tag }}
-
name: Update repo description
uses: peter-evans/dockerhub-description@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ env.dockerhub_repository }}
36 changes: 36 additions & 0 deletions .github/workflows/docker-build-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: docker-build-latest

env:
dockerhub_repository: "kutt/kutt"

on:
release:
types: [published]

jobs:
dockerhub-build-push:
runs-on: ubuntu-latest
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.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ env.dockerhub_repository }}:${{ github.event.release.tag_name }}, ${{ env.dockerhub_repository }}:latest

0 comments on commit d78e256

Please sign in to comment.