mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-02-06 13:22:18 +08:00
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
108 lines
3.7 KiB
YAML
108 lines
3.7 KiB
YAML
|
|
name: Container build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
- 'stable'
|
|
- 'beta'
|
|
- 'release/**'
|
|
tags:
|
|
- 'v*'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '.github/**'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '.github/**'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and Push Container
|
|
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-tags: true
|
|
submodules: false
|
|
fetch-depth: 0
|
|
|
|
- name: Set PX4 Tag
|
|
id: px4-tag
|
|
run: |
|
|
echo "tag=$(git describe --tags --match 'v[0-9]*')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
if: github.event_name != 'pull_request'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
ghcr.io/PX4/px4-dev
|
|
${{ (github.event_name != 'pull_request') && 'px4io/px4-dev' || '' }}
|
|
tags: |
|
|
type=raw,enable=true,value=${{ steps.px4-tag.outputs.tag }},priority=1000
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and load container image
|
|
uses: docker/build-push-action@v6
|
|
id: docker
|
|
with:
|
|
context: Tools/setup
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
platforms: |
|
|
linux/amd64
|
|
load: true
|
|
push: false
|
|
cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
|
|
cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max
|
|
|
|
- name: Get Tag Name
|
|
id: tag_name
|
|
run: |
|
|
echo "::set-output name=tag_name::$(echo '${{ fromJSON(steps.docker.outputs.metadata)['image.name'] }}' | sed 's/,.*$//')"
|
|
|
|
- name: make quick_check
|
|
uses: addnab/docker-run-action@v3
|
|
with:
|
|
image: ${{ steps.tag_name.outputs.tag_name }}
|
|
options: -v ${{ github.workspace }}:/workspace
|
|
run: |
|
|
cd /workspace
|
|
git config --global --add safe.directory /workspace
|
|
make px4_sitl_default
|
|
make px4_fmu-v6x_default
|
|
|
|
- name: Push container image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: Tools/setup
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
platforms: |
|
|
linux/amd64
|
|
provenance: mode=max
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
cache-from: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
|
|
cache-to: type=s3,blobs_prefix=cache/${{ github.repository }}/,manifests_prefix=cache/${{ github.repository }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }},mode=max
|