Initial commit
This commit is contained in:
commit
657ff2ec0e
9 changed files with 409 additions and 0 deletions
57
.github/workflows/build.yaml
vendored
Normal file
57
.github/workflows/build.yaml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Build and Push
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 6 * * *'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: menci/archlinuxarm
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- tag: base
|
||||
package-group: base
|
||||
- tag: base-devel
|
||||
package-group: base base-devel
|
||||
name: ${{ matrix.target.tag }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Generate Tag List
|
||||
run: |
|
||||
echo "TAGS<<EOF" >> $GITHUB_ENV
|
||||
|
||||
DATE="$(date +'%Y%m%d')"
|
||||
echo $IMAGE_NAME:$TAG >> $GITHUB_ENV
|
||||
echo $IMAGE_NAME:$TAG-$DATE.$RUN_ID >> $GITHUB_ENV
|
||||
if [[ "$TAG" == "base" ]]; then
|
||||
echo $IMAGE_NAME:latest >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
env:
|
||||
TAG: ${{ matrix.target.tag }}
|
||||
RUN_ID: ${{ github.run_id }}
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
push: true
|
||||
tags: ${{ env.TAGS }}
|
||||
build-args: |
|
||||
PACKAGE_GROUP=${{ matrix.target.package-group }}
|
||||
Reference in a new issue