-
Notifications
You must be signed in to change notification settings - Fork 16
40 lines (40 loc) · 1.25 KB
/
build.yaml
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
name: Build Images
run-name: ${{ github.actor }} is BUILDING Base and Complete Images 🚀
on:
push:
branches:
- master
jobs:
Clean-Repo:
runs-on: [self-hosted, Linux, X64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get current date
run: echo "RELEASE_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
- name: Fetch origin
run: git fetch origin
- name: Checkout master
run: git checkout master
- name: Delete local branches
run: git checkout -b "tmp" || true && git checkout master && git for-each-ref --format '%(refname:short)' refs/heads | grep -v "master\|main" | xargs git branch -D
- name: Pull origin
run: git pull origin master
Build-Images:
timeout-minutes: 180
needs: Clean-Repo
runs-on: [self-hosted, Linux, X64]
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
id: qemu
uses: docker/[email protected]
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Build Images
run: bash ./build.sh