This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
55 lines (55 loc) · 1.58 KB
/
merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Merge master
on:
pull_request:
types: [closed]
concurrency:
group: ${{ github.ref }}.merge
cancel-in-progress: true
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
DOCKER_DEFAULT_PLATFORM: linux/amd64
jobs:
pr-merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Environment Variables
uses: ./.github/actions/setvars
with:
varFilePath: ./.github/variables/vars.env
- uses: jpribyl/[email protected]
continue-on-error: true
with:
key: image-build-${{ env.TAG }}-{hash}
restore-keys: |
image-build-${{ env.TAG }}-
- name: Setup buildx
uses: docker/setup-buildx-action@v2
- name: Build image
run: ./hooks/build
- name: Log in to Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: itsthejb
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Tag image
run: docker tag itsthejb/ispconfig:latest itsthejb/ispconfig:${{ env.TAG }}
- name: Push image
run: docker push itsthejb/ispconfig:${{ env.TAG }}
delete-branch:
runs-on: ubuntu-latest
steps:
- name: Delete merged branch
continue-on-error: true
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}