Skip to content

Commit

Permalink
Add GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Nov 10, 2023
1 parent bd94a8d commit 4ddc97c
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 44 deletions.
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Please do not submit a Pull Request via github. Our project makes use of
mailing lists for patch submission and review. For more details please
see https://u-boot.readthedocs.io/en/latest/develop/sending_patches.html

The only exception to this is in order to trigger a CI loop on Azure prior
to posting of patches.
62 changes: 62 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
on: [push]

env:
RELEASE_START: 213
CCACHE_DIR: $RUNNER_TEMP/ccache

jobs:
build:
# runs-on: [self-hosted, Linux, ARM64]
runs-on: ubuntu-latest
container: ayufan/rock64-dockerfiles:bookworm
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Reset ccache statistics
run: ccache -M 0 -F 0
- name: Build package
run: |
export RELEASE=$(($RELEASE_START+$GITHUB_RUN_NUMBER))
rm -f ../*.deb
make BOARD_TARGET=rock64
make BOARD_TARGET=rockpro64
make BOARD_TARGET=rockpi4b
make BOARD_TARGET=rockpi5b
make BOARD_TARGET=pinebookpro
- name: Release package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
export RELEASE=$(($RELEASE_START+$GITHUB_RUN_NUMBER))
export RELEASE_NAME="$(make version BOARD_TARGET=rock64)"
export RELEASE_TITLE="$(make version BOARD_TARGET=rock64)"
export DESCRIPTION="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
github-release release \
--tag "${RELEASE_NAME}" \
--name "${RELEASE_TITLE}" \
--user "${GITHUB_REPOSITORY%/*}" \
--repo "${GITHUB_REPOSITORY#*/}" \
--description "${DESCRIPTION}" \
--target "${GITHUB_SHA}" \
--draft
sleep 3s # allow to update release
for i in *.deb; do
github-release upload \
--tag "${RELEASE_NAME}" \
--name "$(basename "${i}")" \
--user "${GITHUB_REPOSITORY%/*}" \
--repo "${GITHUB_REPOSITORY#*/}" \
--file "${i}"
done
github-release edit \
--tag "${RELEASE_NAME}" \
--name "${RELEASE_TITLE}" \
--user "${GITHUB_REPOSITORY%/*}" \
--repo "${GITHUB_REPOSITORY#*/}" \
--description "${DESCRIPTION}"
44 changes: 0 additions & 44 deletions .gitlab-ci.yml

This file was deleted.

0 comments on commit 4ddc97c

Please sign in to comment.