Added getLibraries method (#176) #196
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 Docker Image | |
| on: | |
| push: | |
| jobs: | |
| set_version: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get branch name | |
| id: branch_name | |
| run: | | |
| GIT_BRANCH=`git symbolic-ref --short HEAD | sed "s/[^[:alnum:].]//g"` | |
| echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_OUTPUT | |
| - name: Get semantic version | |
| uses: paulhatch/[email protected] | |
| id: versioning | |
| with: | |
| tag_prefix: "v" | |
| major_pattern: "[MAJOR]" | |
| minor_pattern: "[MINOR]" | |
| format: "${major}.${minor}.${patch}.dev${increment}" | |
| bump_each_commit: false | |
| outputs: | |
| version: ${{ github.ref == 'refs/heads/master' && steps.versioning.outputs.version_tag || steps.versioning.outputs.version}} | |
| buildx: | |
| runs-on: ubuntu-22.04 | |
| needs: [ set_version ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Inspect builder | |
| run: | | |
| echo "Name: ${{ steps.buildx.outputs.name }}" | |
| echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
| echo "Status: ${{ steps.buildx.outputs.status }}" | |
| echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
| echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
| - name: Login to DockerHub | |
| if: success() | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Docker Buildx (build) | |
| if: success() && !(github.repository == 'toncenter/ton-http-api' && github.event_name == 'push' && github.ref == 'refs/heads/master') | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| context: ./ton-http-api | |
| file: ./ton-http-api/.docker/Dockerfile | |
| tags: toncenter/ton-http-api:${{ needs.set_version.outputs.version }} | |
| - name: Docker Buildx (build and push) | |
| if: success() && (github.repository == 'toncenter/ton-http-api' && github.event_name == 'push' && github.ref == 'refs/heads/master') | |
| uses: docker/build-push-action@v6 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| context: ./ton-http-api | |
| file: ./ton-http-api/.docker/Dockerfile | |
| tags: toncenter/ton-http-api:${{ needs.set_version.outputs.version }},toncenter/ton-http-api:latest | |
| - name: Inspect image | |
| if: always() && github.repository == 'toncenter/ton-http-api' && github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| run: | | |
| docker buildx imagetools inspect toncenter/ton-http-api:${{ needs.set_version.outputs.version }} |