-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.19 KB
/
build-server.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
41
42
43
44
45
46
47
48
49
name: Build Server
on:
workflow_dispatch:
push:
branches:
- "main"
tags:
- "v*"
jobs:
update_dockerhub:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Download release check-chart
uses: dsaltares/fetch-gh-release-asset@master
with:
file: check-chart_0.0.1_linux_amd64.tar.gz
repo: beclab/check-chart
target: check-chart.tar.gz
version: tags/v0.0.1
- name: get latest tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
id: get-latest-tag
with:
fallback: latest
- name: unpack check-chart
run: |
tar zxvf check-chart.tar.gz
pwd
ls
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: beclab/devbox-server:${{ steps.get-latest-tag.outputs.tag }}
file: Dockerfile.server