This repository was archived by the owner on Dec 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (66 loc) · 1.97 KB
/
Copy pathbuild.yml
File metadata and controls
67 lines (66 loc) · 1.97 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
on:
release:
types:
- created
jobs:
matrix:
name: Get Matrix Data
runs-on: ubuntu-latest
outputs:
useMatrix: ${{ steps.data.outputs.useMatrix }}
major: ${{ steps.data.outputs.major }}
minor: ${{ steps.data.outputs.minor }}
patch: ${{ steps.data.outputs.patch }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
working-directory: .github/actions/split_tag
- name: Get Matrix Data
id: data
uses: ./.github/actions/split_tag
with:
version: ${{ github.ref }}
build:
name: Build and Deploy
runs-on: ubuntu-latest
needs:
- matrix
if: needs.matrix.outputs.useMatrix == 'false'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: docker build -t "drinternet/rsync:${{ needs.matrix.outputs.major }}" .
- name: Sign Into Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Hub
run: docker push drinternet/rsync:${{ needs.matrix.outputs.major }}
matrix-build:
strategy:
matrix:
version:
- ${{ needs.matrix.outputs.major }}
- ${{ needs.matrix.outputs.minor }}
- ${{ needs.matrix.outputs.patch }}
runs-on: ubuntu-latest
needs:
- matrix
if: needs.matrix.outputs.useMatrix == 'true'
name: Build and Deploy (${{ matrix.version }})
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: docker build -t "drinternet/rsync:${{ matrix.version }}" .
- name: Sign Into Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Hub
run: docker push drinternet/rsync:${{ matrix.version }}