-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.03 KB
/
arch.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 the Arch
on:
push:
branches:
- device/windows
- device/arch
pull_request:
branches-ignore:
- device/windows
- device/arch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create image tag
id: image_tag
run: |
VARIANT="$(TZ=UTC-9 date +%Y%m%d)_${IMAGE_HASH:0:7}"
IMAGE_NAME="onlymyarch"
TAG="${IMAGE_NAME}:${VARIANT}"
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
echo "IMAGE_NAME=${IMAGE_NAME}" >> $GITHUB_OUTPUT
- name: Build arch image
run: |
docker build -t ${{ steps.image_tag.outputs.TAG }} images/arch
- name: Run arch container
run: |
# Change owner of workspace to ubuntu user
sudo chown -R 1000:1000 ${{ github.workspace }}
docker run -t --rm -v ${{ github.workspace }}:/home/user -w /home/user ${{ steps.image_tag.outputs.TAG }} zsh -c "$(curl -fsLS chezmoi.io/get)" -- init --apply -S .