-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 2.05 KB
/
push.yml
File metadata and controls
73 lines (69 loc) · 2.05 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
68
69
70
71
72
73
name: Build
on:
push:
branches:
- master
jobs:
lint:
name: Lint Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Commitlint
uses: ahmadnassri/action-commit-lint@v2
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
path: ".zshrc,**/*.sh,.config/yadm/bootstrap"
test-yadm:
name: Test Yadm
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: sudo apt-get install yadm
- run: yadm clone https://github.com/jckimble/dotfiles --bootstrap
test-devcontainer:
name: Test Devcontainer
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 16
- run: npm install -g @devcontainers/cli@latest
- run: npx devcontainer up --remove-existing-container --dotfiles-repository jckimble/dotfiles --workspace-folder .
- run: npx devcontainer exec --workspace-folder . vim '+PlugUpdate' '+PlugClean!' '+PlugUpdate' '+qall'
build-docker:
name: Build Docker Image
needs:
- lint
- test-yadm
- test-devcontainer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Get Build Time and Date
run: |
echo "BUILD_DATE=$(date +%m-%d-%Y)" >> $GITHUB_ENV
echo "BUILD_TIME=$(date +%H:%M)" >> $GITHUB_ENV
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
file: .config/Dockerfile
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_TIME=${{ env.BUILD_TIME }}
platforms: linux/amd64
push: true
tags: jckimble/dotfiles:latest