Skip to content

Commit

Permalink
ci(client): refactor release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Guidée <[email protected]>
  • Loading branch information
quentinguidee committed Mar 4, 2024
1 parent 2782249 commit 4a6162e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 47 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/client-release.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/client-dev.yml → .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- "client/**"
- "packages/**"
- ".github/workflows/client-dev.yml"
tags:
- "v*"

pull_request:
branches:
- main
Expand Down Expand Up @@ -53,3 +56,26 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64,linux/arm
no-cache: true

promote-docker:
name: Promote Docker images
runs-on: ubuntu-latest
needs:
- build
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read
packages: write
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Promote images
run: |
docker pull ghcr.io/${{ github.repository_owner }}/client:${{ format('{0}', github.ref_name) }}
docker tag ghcr.io/${{ github.repository_owner }}/client:${{ format('{0}', github.ref_name) }} ghcr.io/${{ github.repository_owner }}/client:latest
docker push ghcr.io/${{ github.repository_owner }}/client:latest

0 comments on commit 4a6162e

Please sign in to comment.