add tsm-shim example: run unmodified configfs-tsm binaries via a sidecar #1
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 tsm-shim | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'tsm-shim/**' | |
| - '.github/workflows/build-tsm-shim.yml' | |
| pull_request: | |
| paths: | |
| - 'tsm-shim/**' | |
| - '.github/workflows/build-tsm-shim.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE: ghcr.io/dstack-tee/dstack-tsm-shim | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| # On PRs (incl. forks) GITHUB_TOKEN lacks packages:write, so only build. | |
| - name: Log in to GHCR | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=sha,format=short | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: tsm-shim | |
| file: tsm-shim/Dockerfile | |
| platforms: linux/amd64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |