pkr: install gnu-sed with precedence #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |