-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (62 loc) · 2.71 KB
/
continuous.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
52
53
54
55
56
57
58
59
60
61
62
name: Continuous
on: push
permissions:
contents: read
id-token: write
packages: write
jobs:
all:
runs-on: macos-11
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
GO111MODULE: 'off'
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
PACKER_GITHUB_API_TOKEN: ${{ github.token }}
PACKER_LOG: '1'
VAGRANT_LOG: debug
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: setup go
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: build and install tgzarmorer
run: go get -f -u -v -x github.com/inloco/xcode/tgzarmorer
- name: install unttify
run: cp ./hack/unttify.py /usr/local/bin/unttify
- name: install and setup casks
run: |
brew install --cask homebrew/cask-versions/vmware-fusion12 packages hashicorp/tap/hashicorp-vagrant
sh ./hack/kickstart-vmware.sh '${{ secrets.VMWARE_FUSION_SERIAL_NUMBER }}'
vagrant plugin install vagrant-vmware-desktop
- name: install vagrant-vmware-utility
run: |
# brew install vagrant-vmware-utility
curl -sSLO https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_x86_64.dmg
sudo hdiutil attach vagrant-vmware-utility_1.0.21_x86_64.dmg
sudo installer -pkg /Volumes/Vagrant\ VMWare\ Utility/VagrantVMwareUtility.pkg -target /
- name: install and setup formulae
run: |
brew install --formula jq packer parallel skopeo
sh ./hack/cite-parallel.sh
sh ./hack/unttify-skopeo.sh
- name: purge frameworks
run: sudo ./hack/purge-frameworks.sh
- name: install and setup macbox
run: |
skopeo copy --debug --command-timeout 1h 'docker://docker.io/inloco/macbox:latest' "dir://$(pwd)/macbox"
mkdir -p ~/.vagrant.d/boxes/incognia-VAGRANTSLASH-macbox/0/vmware_fusion
cat $(jq -r '.layers[].digest | "./macbox/" + split(":")[-1]' ./macbox/manifest.json) | gunzip -cf | tar -xvO --ignore-zeros | gunzip -cf | tar -xvC ~/.vagrant.d/boxes/incognia-VAGRANTSLASH-macbox/0/vmware_fusion
- name: make all
run: make
- name: aws configure
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT }}:role/ecr-public
- name: docker push
run: |
skopeo login -u 'AWS' -p "$(aws ecr-public get-login-password)" public.ecr.aws
make 'IMAGE_REGISTRY=public.ecr.aws' 'IMAGE_REPOSITORY=incognia/mactions' -C oci push
make 'IMAGE_REGISTRY=public.ecr.aws' 'IMAGE_REPOSITORY=incognia/mactions' -C oci latest