Skip to content

Commit 104e5fb

Browse files
committed
migrate to GHA
1 parent 6d41ae9 commit 104e5fb

2 files changed

Lines changed: 68 additions & 56 deletions

File tree

.drone.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build & Push & Deploy
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
push:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
# https://github.com/docker/setup-buildx-action
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
21+
22+
# https://github.com/docker/login-action
23+
- name: Log into GitHub container registry
24+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Log into private container registry
31+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
32+
with:
33+
registry: registry-lynx.max-heidinger.de
34+
username: ${{ secrets.REGISTRY_USERNAME }}
35+
password: ${{ secrets.REGISTRY_PASSWORD }}
36+
37+
# https://github.com/docker/build-push-action
38+
- name: Build and push Docker image
39+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
40+
with:
41+
context: .
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: |
45+
ghcr.io/mheidinger/simple-diff:latest
46+
ghcr.io/mheidinger/simple-diff:${{ github.sha }}
47+
registry-lynx.max-heidinger.de/simple-diff:latest
48+
registry-lynx.max-heidinger.de/simple-diff:${{ github.sha }}
49+
50+
# deploy:
51+
# runs-on: ubuntu-latest
52+
# needs: push
53+
#
54+
# steps:
55+
# # https://github.com/distributhor/workflow-webhook
56+
# - name: Deploy
57+
# uses: distributhor/workflow-webhook@v3
58+
# with:
59+
# webhook_type: "json-extended"
60+
# webhook_url: ${{ secrets.WEBHOOK_URL }}
61+
# webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
62+
# - name: Deploy Second Instance
63+
# uses: distributhor/workflow-webhook@v3
64+
# with:
65+
# webhook_type: "json-extended"
66+
# webhook_url: ${{ secrets.WEBHOOK_URL_2 }}
67+
# webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
68+
#

0 commit comments

Comments
 (0)