Skip to content

Create alpine.yml

Create alpine.yml #1

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Alpine
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "readme" branch
push:
branches: [ "readme" ]
pull_request:
branches: [ "readme" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
SCRIPT_REPO: ${{ github.repository }}
SCRIPT_REF: ${{ github.ref_name }}
UBOOT_REPO: hzyitc/u-boot-onecloud
UBOOT_RELEASE: latest
UBOOT_BURNIMG: eMMC.burn.img
ARMBIAN_REPO: armbian/build
ARMBIAN_REF: main
PATCHES: 4077,5076
PATCHES_DISABLED: 5082
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
prepare:
name: Prepare
runs-on: ubuntu-22.04
outputs:
env: ${{ steps.get.outputs.env }}
steps:
- id: get
name: Get repositories information
run: |
TIME="$(curl https://api.github.com/repos/${SCRIPT_REPO}/actions/runs/${GITHUB_RUN_ID} | jq -r .created_at)"
TAG="ci-$(date -d "${TIME}" -u +'%Y%m%d-%H%M%S-%Z')"
SCRIPT_SHA=$(curl https://api.github.com/repos/${SCRIPT_REPO}/commits/${SCRIPT_REF} | jq -r .sha)
UBOOT_TAG=$(curl https://api.github.com/repos/${UBOOT_REPO}/releases/${UBOOT_RELEASE} | jq -r .tag_name)
ARMBIAN_SHA=$(curl https://api.github.com/repos/${ARMBIAN_REPO}/commits/${ARMBIAN_REF} | jq -r .sha)
cat <<EOF | sed -E 's/^ //' >>$GITHUB_ENV
TIME=$TIME
TAG=$TAG
SCRIPT_SHA=$SCRIPT_SHA
UBOOT_TAG=$UBOOT_TAG
ARMBIAN_SHA=$ARMBIAN_SHA
EOF
echo "env=$(cat $GITHUB_ENV | base64 -w 0)" >>$GITHUB_OUTPUT