-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (33 loc) · 976 Bytes
/
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
name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
timeout-minutes: 5
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
timeout-minutes: 5
- name: Get Short SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
timeout-minutes: 5
- name: Get Epoch
id: epoch
run: echo "epoch=$(date +%s)">> $GITHUB_OUTPUT
timeout-minutes: 5
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: web/
push: true
tags: "improwised/hydra-webui:${{ github.ref_name }}-${{ steps.vars.outputs.sha_short }}-${{ steps.epoch.outputs.epoch }}"
timeout-minutes: 10