Skip to content

Commit

Permalink
Upload armv8 mini to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
haiibo committed Jun 29, 2023
1 parent 0ecd346 commit db75e8d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/ARMv8-Docker-BuildX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ on:
- cron: 0 1 * * 6

env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
DOCKER_BUILD: buildImageX.sh
DOCKER_IMAGE: summary/openwrt-aarch64
TAG: mini

jobs:
build:
Expand All @@ -19,18 +18,11 @@ jobs:
- name: Checkout
uses: actions/checkout@main

- name: Extract OpenWrt Version
run: |
git clone $REPO_URL -b $REPO_BRANCH openwrt
cd $GITHUB_WORKSPACE/openwrt
version=$(cat "package/lean/default-settings/files/zzz-default-settings" | grep DISTRIB_REVISION= | awk -F "'" '{print $2}')
echo "TAG=$version" >> $GITHUB_ENV
- name: Extract OpenWrt Firmware
id: download
run: |
cd $GITHUB_WORKSPACE/docker
wget -q $(curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/releases" | grep "ARMv8_Docker.*rootfs.tar.gz" | cut -d '"' -f 4)
wget -q $(curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/releases" | grep "ROOTFS_MINI.*rootfs.tar.gz" | cut -d '"' -f 4)
chmod +x $DOCKER_BUILD && ./$DOCKER_BUILD
echo "status=success" >> $GITHUB_OUTPUT
Expand All @@ -55,4 +47,3 @@ jobs:
push: true
tags: |
${{ env.DOCKER_IMAGE }}:${{ env.TAG }}
${{ env.DOCKER_IMAGE }}
50 changes: 50 additions & 0 deletions .github/workflows/ARMv8-Docker-OpenWrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,53 @@ jobs:
默认 IP:192.168.1.1 默认密码:password
当前使用版本:【编译前的最后一次[➦主源码](https://github.com/coolsnowwolf/lede)更新记录】
${{ env.VERSION_INFO }}
Upload:
needs: [Build]
runs-on: ubuntu-22.04

env:
DOCKER_BUILD: buildImageX.sh
DOCKER_IMAGE: summary/openwrt-aarch64

steps:
- name: Checkout
uses: actions/checkout@main

- name: Extract OpenWrt Version
run: |
git clone $REPO_URL -b $REPO_BRANCH openwrt
cd $GITHUB_WORKSPACE/openwrt
version=$(cat "package/lean/default-settings/files/zzz-default-settings" | grep DISTRIB_REVISION= | awk -F "'" '{print $2}')
echo "TAG=$version" >> $GITHUB_ENV
- name: Extract OpenWrt Firmware
id: download
run: |
cd $GITHUB_WORKSPACE/docker
wget -q $(curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/releases" | grep "ARMv8_Docker.*rootfs.tar.gz" | cut -d '"' -f 4)
chmod +x $DOCKER_BUILD && ./$DOCKER_BUILD
echo "status=success" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@master

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master

- name: Login to Docker Hub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker
if: steps.download.outputs.status == 'success'
uses: docker/build-push-action@master
with:
platforms: linux/arm64
context: docker
push: true
tags: |
${{ env.DOCKER_IMAGE }}:${{ env.TAG }}
${{ env.DOCKER_IMAGE }}

0 comments on commit db75e8d

Please sign in to comment.