Script: modify Dockerfile #1
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
| # Author: Kang Lin <[email protected]> | ||
| name: docker | ||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| name: | ||
| description: "The artifact name" | ||
| value: ${{ jobs.build_docker.outputs.name }} | ||
| env: | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
| jobs: | ||
| build_docker: | ||
| strategy: | ||
| matrix: | ||
| PACKAGE: [deb, rpm] | ||
| - PACKAGE: deb | ||
| os: ubuntu | ||
| - PACKAGE: rpm | ||
| os: fedora | ||
| # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) | ||
| # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) | ||
| # See: https://github.com/actions/runner-images/ | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| RabbitRemoteControl_VERSION: 0.0.32 | ||
| artifact_name: build_docker | ||
| # Map the job outputs to step outputs | ||
| outputs: | ||
| name: ${{ env.artifact_name }} | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - name: run docker | ||
| run: | | ||
| ./Script/build_linux.sh --docker --os=${{matrix.os}} --${{matrix.PACKAGE}} | ||
| - name: Update artifact | ||
| if: ${{matrix.PACKAGE == 'rpm'}} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ env.artifact_name }}_${{matrix.PACKAGE}} | ||
| path: | | ||
| ${{github.workspace}}/build_linux/rabbitremotecontrol*.rpm | ||