-
Notifications
You must be signed in to change notification settings - Fork 26
44 lines (36 loc) · 1013 Bytes
/
docker-spa.yml
File metadata and controls
44 lines (36 loc) · 1013 Bytes
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
name: Build and push SPA image
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_REF_TYPE: ${{ github.ref_type }}
GITHUB_REF_NAME: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set image tag
id: vars
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
echo "TAG=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
else
echo "TAG=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_OUTPUT
fi
- uses: docker/build-push-action@v4
with:
context: frontend
file: frontend/Dockerfile
push: true
tags: skeptrune/jukebox-spa:${{ steps.vars.outputs.TAG }}