-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.29 KB
/
push.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
50
51
name: Push to main
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.6.0
- name: Hadolint
run: docker compose run --rm hadolint Dockerfile
- name: Shellcheck
run: docker compose run --rm shellcheck tools/*
build-test-push:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.6.0
- name: Login to Docker
uses: docker/login-action@v3.1.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build
uses: docker/build-push-action@v5.3.0
- name: Build Test
uses: docker/build-push-action@v5.3.0
with:
target: test
- name: Test
run: DOCKER_BUILDKIT=1 docker compose run --rm bats test
- name: Push
uses: docker/build-push-action@v5.3.0
with:
push: true
tags: technowledgy/vlux:latest
dockerhub:
needs: build-test-push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.6.0
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v4.0.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}