naas-abi-marketplace-v3.6.0 #861
Workflow file for this run
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 ABI Container | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read # This is required for actions/checkout | |
| packages: write # This is required for ghcr.io | |
| jobs: | |
| build: | |
| # if: startsWith(github.event.release.tag_name, 'naas-abi-v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx- | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.ACCESS_TOKEN }} | |
| - name: Build Docker image | |
| run: | | |
| pip install uv | |
| touch .env | |
| make build | |
| docker tag abi:latest ghcr.io/${{ github.repository }}/abi:latest | |
| docker tag abi:latest ghcr.io/${{ github.repository }}/abi:${{ github.event.release.tag_name }} | |
| - name: Push Docker image to GitHub Container Registry | |
| run: | | |
| docker push ghcr.io/${{ github.repository }}/abi:${{ github.event.release.tag_name }} | |
| docker push ghcr.io/${{ github.repository }}/abi:latest |