Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .circleci/config.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on: push

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Run on architecture ppc64le
uses: uraimo/run-on-arch-action@v2.1.1
with:
arch: ppc64le
distro: alpine_latest
env: |
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
run: |
apk add --upd alpine-sdk docker
make release

# - name: Run on architecture armv7
# uses: uraimo/run-on-arch-action@v2.1.1
# with:
# arch: armv7
# distro: alpine_latest
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# env: |
# GOARCH: amd64
# GOOS: linux
# run: |
# apk add --upd alpine-sdk docker
# make release

- name: Run on architecture aarch64
uses: uraimo/run-on-arch-action@v2.1.1
with:
arch: aarch64
distro: alpine_latest
githubToken: ${{ secrets.GITHUB_TOKEN }}
run: |
apk add --upd alpine-sdk docker
make release

- name: Run on architecture amd64
run: |
make release
make test

- name: Manifest
run: |
make release-manifest
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

27 changes: 18 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TAG=1.9.7
ALPINE_VERSION=3.15

IMAGE=imega/base-builder
TAG=latest
ALPINE_VERSION=3.11
ARCH=$(shell uname -m)

ifeq ($(ARCH),aarch64)
Expand All @@ -12,23 +13,31 @@ ifeq ($(ARCH),x86_64)
endif

build:
@docker build --build-arg VERSION=$(TAG) \
docker build --build-arg VERSION=$(TAG) \
--build-arg ALPINE_VERSION=$(ALPINE_VERSION) \
--platform $(ARCH) \
-t $(IMAGE):$(TAG)-$(ARCH) .
@docker inspect $(IMAGE):$(TAG)-$(ARCH)

login:
@docker login --username $(DOCKER_USER) --password $(DOCKER_PASS)

release: login build
@docker tag $(IMAGE):$(TAG)-$(ARCH) $(IMAGE):latest-$(ARCH)
@docker push $(IMAGE):$(TAG)-$(ARCH)
@docker push $(IMAGE):latest-$(ARCH)
#@docker push $(IMAGE):$(TAG)-$(ARCH)
#@docker push $(IMAGE):latest-$(ARCH)

release-manifest: login
docker manifest create $(IMAGE):$(TAG) $(IMAGE):$(TAG)-amd64 $(IMAGE):$(TAG)-ppc64le $(IMAGE):$(TAG)-arm64
docker manifest create $(IMAGE):latest $(IMAGE):latest-amd64 $(IMAGE):latest-ppc64le $(IMAGE):latest-arm64
docker manifest push $(IMAGE):$(TAG)
docker manifest push $(IMAGE):latest
docker manifest create $(IMAGE):$(TAG) \
$(IMAGE):$(TAG)-amd64 \
$(IMAGE):$(TAG)-ppc64le \
$(IMAGE):$(TAG)-arm64
docker manifest create $(IMAGE):latest \
$(IMAGE):latest-amd64 \
$(IMAGE):latest-ppc64le \
$(IMAGE):latest-arm64
#docker manifest push $(IMAGE):$(TAG)
#docker manifest push $(IMAGE):latest

test: build
$(MAKE) test -C tests IMAGE=$(IMAGE) TAG=$(TAG)
8 changes: 6 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ esac
done

cat << 'EOF' > /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.13/main
http://dl-cdn.alpinelinux.org/alpine/v3.13/community
http://dl-cdn.alpinelinux.org/alpine/v3.15/main
http://dl-cdn.alpinelinux.org/alpine/v3.15/community
@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing
@main http://dl-cdn.alpinelinux.org/alpine/edge/main
@community http://dl-cdn.alpinelinux.org/alpine/edge/community
Expand Down Expand Up @@ -57,6 +57,10 @@ http://dl-cdn.alpinelinux.org/alpine/v3.13/community
@v312community http://dl-cdn.alpinelinux.org/alpine/v3.12/community
@v313 http://dl-cdn.alpinelinux.org/alpine/v3.13/main
@v313community http://dl-cdn.alpinelinux.org/alpine/v3.13/community
@v314 http://dl-cdn.alpinelinux.org/alpine/v3.13/main
@v314community http://dl-cdn.alpinelinux.org/alpine/v3.13/community
@v315 http://dl-cdn.alpinelinux.org/alpine/v3.15/main
@v315community http://dl-cdn.alpinelinux.org/alpine/v3.15/community
EOF

apk --repositories-file /etc/apk/repositories --update --allow-untrusted --initdb --no-cache --root $ROOTFS add $PACKAGES
Expand Down