Skip to content

Commit 8b3178d

Browse files
committed
Switch to GitHub Actions to resume builds
Travis stopped building images on their .org instance on 15 Jun 2021, leaving the last push to Docker Hub on 19 May 2021. That's a few months out of date, now, which causes pulls to have lots of updates to run on startup. In the interest of getting builds going again, and moving away from Travis, here is a switch to GitHub Actions instead. I also replaced the QEMU setup script with a Docker image designed to do the same thing, mostly so the builds would complete.
1 parent c004bc8 commit 8b3178d

7 files changed

Lines changed: 75 additions & 58 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
schedule:
11+
- cron: '0 0 * * 0' # Run weekly on Sunday at midnight
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
arch:
20+
- arm32v7
21+
- arm64v8
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Enable Docker experimental mode for image squashing
25+
if: github.actor != 'nektos/act'
26+
run: |
27+
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json
28+
sudo systemctl restart docker
29+
- name: Setup dependencies
30+
run: |
31+
sudo apt-get update && \
32+
sudo apt-get --yes --no-install-recommends install qemu-user-static
33+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
34+
chmod -R g-w ./
35+
- name: Build images
36+
run: ./build
37+
env:
38+
BUILD_ARCH: ${{ matrix.arch }}
39+
DOCKER_ORG: ${{ secrets.DOCKER_USERNAME }}
40+
- name: Deploy images
41+
if: github.event_name != 'pull_request'
42+
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && ./push
43+
env:
44+
BUILD_ARCH: ${{ matrix.arch }}
45+
DOCKER_ORG: ${{ secrets.DOCKER_USERNAME }}
46+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
47+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
48+
49+
manifests:
50+
runs-on: ubuntu-latest
51+
if: github.event_name != 'pull_request'
52+
needs:
53+
- build
54+
steps:
55+
- uses: actions/checkout@v2
56+
- name: Setup dependencies
57+
run: docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
58+
env:
59+
DOCKER_ORG: ${{ secrets.DOCKER_USERNAME }}
60+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
61+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
62+
- name: Create Manifest
63+
run: ./create-manifest
64+
env:
65+
DOCKER_ORG: ${{ secrets.DOCKER_USERNAME }}

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Basic Arch Linux ARM Docker images [![Build Status](https://travis-ci.org/agners/archlinuxarm-docker.svg?branch=master)](https://travis-ci.org/agners/archlinuxarm-docker)
1+
# Basic Arch Linux ARM Docker images [![Build and Deploy](https://github.com/agners/archlinuxarm-docker/actions/workflows/build-deploy.yml/badge.svg)](https://github.com/agners/archlinuxarm-docker/actions/workflows/build-deploy.yml)
22

33
Docker images for Arch Linux ARM on AArch32 (ARMv7-A) and AArch64 (ARMv8-A). Built using native pacman and Docker multi-stage builds. Builds weekly by Travis CI on publicly visible infrastructure using Qemu emulation.
44

@@ -16,7 +16,7 @@ Instead of using the multi-arch container above, you can also get the architectu
1616

1717
| Tag | Update | Type | Description |
1818
|:------:|:----------:|:-------:|:-----------------------------------------------------------------------------------|
19-
| latest | **weekly** | minimal | minimal Arch Linux ARM with pacman support |
19+
| latest | **weekly** | minimal | minimal Arch Linux ARM with pacman support |
2020

2121
### Layer structure
2222

@@ -43,16 +43,15 @@ docker run -e TZ=Europe/Berlin agners/archlinuxarm
4343
### Prerequisites
4444

4545
- Docker with experimental mode on (required for squash)
46-
- sudo or root is neccessary to setup binfmt for Qemu user mode emulation
4746

4847
### Building
4948

50-
- Prepare binfmt use with Qemu user mode using `sudo ./prepare-qemu`
51-
- Run `BUILD_ARCH=<arch> ./build` to build
49+
- Prepare binfmt use with Qemu user mode using `docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`
50+
- Run `BUILD_ARCH=<arch> DOCKER_ORG=<your_docker_org> ./build` to build
5251
- Use `BUILD_ARCH=arm32v7` for ARMv7 Aarch32
5352
- Use `BUILD_ARCH=arm64v8` for ARMv8 Aarch64
5453

55-
If you want to push the images, run `./push`. *But be aware you have no push access to the repos! Edit the scripts to push to custom Docker Hub locations!*
54+
If you want to push the images, run `DOCKER_ORG=<your_docker_org> ./push`.
5655

5756
### Building from scratch
5857

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -ex
22

33
DOCKER_ARCH=${BUILD_ARCH:-arm32v7}
4-
DOCKER_ORG=agners
4+
DOCKER_ORG=${DOCKER_ORG:-agners}
55
DOCKER_IMAGE=archlinuxarm-${DOCKER_ARCH}
66

77
TAG_DATE=$(date +'%Y%m%d')

create-manifest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash -ex
22

3-
DOCKER_ORG=agners
3+
DOCKER_ORG=${DOCKER_ORG:-agners}
44
DOCKER_IMAGE=archlinuxarm
55

66
TAGS="latest $(date +'%Y%m%d')"
77

88
for TAG in $TAGS
99
do
1010
docker manifest create --amend $DOCKER_ORG/$DOCKER_IMAGE:$TAG \
11-
$DOCKER_ORG/$DOCKER_IMAGE-arm32v7:$TAG \
12-
$DOCKER_ORG/$DOCKER_IMAGE-arm64v8:$TAG
11+
$DOCKER_ORG/$DOCKER_IMAGE-arm32v7:$TAG \
12+
$DOCKER_ORG/$DOCKER_IMAGE-arm64v8:$TAG
1313

1414
docker manifest annotate $DOCKER_ORG/$DOCKER_IMAGE:$TAG \
1515
$DOCKER_ORG/$DOCKER_IMAGE-arm32v7:$TAG \

prepare-qemu

Lines changed: 0 additions & 18 deletions
This file was deleted.

push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -ex
22

33
DOCKER_ARCH=${BUILD_ARCH:-arm32v7}
4-
DOCKER_ORG=agners
4+
DOCKER_ORG=${DOCKER_ORG:-agners}
55
DOCKER_IMAGE=archlinuxarm-${DOCKER_ARCH}
66

77
TAG_DATE=$(date +'%Y%m%d')

0 commit comments

Comments
 (0)