Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thedevs-network/kutt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPouria Ezzati <ezzati.upt@gmail.com>2021-04-03 12:41:41 +0300
committerGitHub <noreply@github.com>2021-04-03 12:41:41 +0300
commitd0c4fba792500b491ca75c4b724a249c95d67bba (patch)
tree98d0d022925e4bb57a0160df886202ae3c042741
parent93e8a9f025abe60a67aa5f33363111ad6b1e241e (diff)
parent75dceaeefcf934ee4200568b09f25679a7587d29 (diff)
Merge pull request #450 from xescure/develop
Automatic multiplatform Docker images via GitHub Actions
-rw-r--r--.github/workflows/docker-build-latest.yaml45
-rw-r--r--.github/workflows/docker-build-release.yaml36
2 files changed, 81 insertions, 0 deletions
diff --git a/.github/workflows/docker-build-latest.yaml b/.github/workflows/docker-build-latest.yaml
new file mode 100644
index 0000000..f7c5d58
--- /dev/null
+++ b/.github/workflows/docker-build-latest.yaml
@@ -0,0 +1,45 @@
+name: docker-build-latest
+
+env:
+ dockerhub_repository: "kutt/kutt"
+ dockerhub_tag: "develop"
+
+on:
+ push:
+ branches:
+ - develop
+
+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 }}
diff --git a/.github/workflows/docker-build-release.yaml b/.github/workflows/docker-build-release.yaml
new file mode 100644
index 0000000..8264a03
--- /dev/null
+++ b/.github/workflows/docker-build-release.yaml
@@ -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