Archlinuxarm armv7 docker #469
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: Archlinuxarm armv7 docker | |
on: | |
push: | |
branches: [ master ] | |
schedule: | |
# once a week | |
- cron: '0 0 * * 1' | |
jobs: | |
build: | |
name: Push archlinuxarm-armv7 image to docker registry | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.21 | |
uses: actions/[email protected] | |
with: | |
go-version: '1.21' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/[email protected] | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
if [ -f Gopkg.toml ]; then | |
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
dep ensure | |
fi | |
- name: Fetch additional packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install fdisk gdisk qemu-user-static libarchive-tools tar | |
- name: Build | |
run: go build -v . | |
- name: Install Packer | |
uses: hashicorp-contrib/setup-packer@v3 | |
with: | |
packer-version: 1.10.0 | |
- name: Install packer plugins | |
run: sudo packer init boards/armv7/archlinuxarm-docker.pkr.hcl | |
- name: Build image | |
run: | | |
sudo packer build \ | |
-var docker_user=$docker_user \ | |
-var docker_password=$docker_password \ | |
-var docker_repository=$docker_repository \ | |
boards/armv7/archlinuxarm-docker.pkr.hcl | |
env: | |
docker_user: ${{ secrets.docker_user }} | |
docker_password: ${{ secrets.docker_password }} | |
docker_repository: mkaczanowski/archlinuxarm |