Merge branch 'develop' #47
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: CD Pipeline | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code - Tests | |
| uses: actions/checkout@v5 | |
| - name: Build and run tests | |
| run: docker build --target tests --progress=plain -t riber-tests . | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - name: Checkout code - Deploy | |
| uses: actions/checkout@v5 | |
| - name: Get version | |
| id: image | |
| run: | | |
| VERSION=$(grep '<Version>' Directory.Build.props | sed 's/.*<Version>\(.*\)<\/Version>.*/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Lowercase repository owner | |
| id: repo | |
| run: echo "owner=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GHCR }} | |
| - name: Build and push to GHCR | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| platforms: linux/amd64 | |
| target: runtime | |
| tags: | | |
| ghcr.io/${{ steps.repo.outputs.owner }}/riber:latest | |
| ghcr.io/${{ steps.repo.outputs.owner }}/riber:${{ steps.image.outputs.version }} |