Update autobuilder.yml #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Debian Builder | |
| on: [push,workflow_dispatch] | |
| jobs: | |
| debian_builder: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ['ubuntu-24.04', 'ubuntu-24.04-arm'] | |
| outputs: | |
| version: ${{ steps.extract.outputs.version }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build image | |
| run: | | |
| cd .devel | |
| chmod +x build_container.sh && ./build_container.sh sas_deb_builder | |
| - name: Extract debian files | |
| id: extract | |
| run: | | |
| cd .devel | |
| chmod +x extract_debian_from_container.sh && ./extract_debian_from_container.sh | |
| cd upload/extract | |
| cat SAS_VERSION >> "$GITHUB_OUTPUT" | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debian-packages-${{ matrix.os }} | |
| path: .devel/upload/extract/* | |
| gh_release: | |
| needs: debian_builder | |
| name: Create Release on GitHub | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 # Download all artifacts | |
| with: | |
| path: release/ | |
| merge-multiple: true | |
| - name: Create release | |
| env: | |
| VERSION: ${{needs.debian_builder.outputs.version}} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd release | |
| gh release create "$VERSION" \ | |
| --repo="$GITHUB_REPOSITORY" \ | |
| --title="${GITHUB_REPOSITORY#*/} ${VERSION}" \ | |
| --generate-notes | |
| build_ppa: | |
| needs: debian_builder | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 # Download all artifacts | |
| with: | |
| path: ppa/ | |
| merge-multiple: true | |
| - name: Create package files # https://assafmo.github.io/2019/05/02/ppa-repo-hosted-on-github.html | |
| env: | |
| PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }} | |
| run: | | |
| cd ppa | |
| ls -lah | |
| echo -e "$PGP_PRIVATE_KEY" | gpg --import | |
| gpg --armor --export "murilomarinho@ieee.org" > KEY.gpg | |
| dpkg-scanpackages --multiversion . > Packages | |
| gzip -k -f Packages | |
| apt-ftparchive release . > Release | |
| gpg --default-key "murilomarinho@ieee.org" -abs -o - Release > Release.gpg | |
| gpg --default-key "murilomarinho@ieee.org" --clearsign -o - Release > InRelease | |
| echo "deb [signed-by=/etc/apt/trusted.gpg.d/smartarmstack_lgpl.gpg] https://smartarmstack.github.io/smart_arm_stack_ROS2 ./" > smartarmstack_lgpl.list | |
| tree -H '.' -L 1 --noreport --charset utf-8 | sed -e '/<hr>/,+7d' > index.html | |
| ls -lah | |
| - name: Upload PPA Files | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ppa/ | |
| deploy_ppa_page: | |
| needs: build_ppa | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| deploy_docker_image: | |
| needs: deploy_ppa_page | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push sas_ros_jazzy | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| file: .devel/sas_ros_jazzy/Dockerfile | |
| tags: ${{ vars.DOCKER_USERNAME }}/sas_ros_jazzy |