Added additional docker stats and made gathering process more asynchr… #17
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| tag_release: | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| outputs: | |
| version: ${{steps.tagging.outputs.new_tag}} | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Bump version and push tag | |
| id: tagging | |
| uses: anothrNick/[email protected] | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DEFAULT_BUMP: patch | |
| publish_docker_image: | |
| needs: [tag_release] | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| # This is used to complete the identity challenge | |
| # with sigstore/fulcio when running outside of PRs. | |
| id-token: write | |
| env: | |
| REGISTRY: ghcr.io | |
| # github.repository as <account>/<repo> | |
| IMAGE_NAME: ${{ github.repository }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/[email protected] | |
| # Set up QEMU for cross-platform builds | |
| - name: Set up QEMU | |
| uses: docker/[email protected] | |
| # Set up BuildKit Docker container builder to be able to build | |
| # multi-platform images and export cache | |
| - name: Set up Docker Buildx | |
| uses: docker/[email protected] | |
| - name: Log into registry ${{ env.REGISTRY }} | |
| uses: docker/[email protected] | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image with Buildx | |
| id: build-and-push | |
| uses: docker/[email protected] | |
| with: | |
| context: . | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.tag_release.outputs.version }} | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| push: true | |
| platforms: linux/amd64,linux/arm64 |