Skip to content

Commit b5f1ab6

Browse files
committed
fix: address bugs in user authentication flow and improve error handling
1 parent d347506 commit b5f1ab6

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish Docker images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "apps/**"
9+
- "packages/**"
10+
- ".github/workflows/**"
11+
workflow_dispatch:
12+
13+
jobs:
14+
push_to_registry:
15+
name: Push Docker images to Docker Hub
16+
runs-on: ubuntu-latest
17+
permissions:
18+
packages: write
19+
contents: read
20+
attestations: write
21+
id-token: write
22+
steps:
23+
- name: Check out the repo
24+
uses: actions/checkout@v4
25+
26+
- name: Read version from package.json
27+
id: get_version
28+
working-directory: ./
29+
run: |
30+
VERSION=$(jq -r '.version' package.json)
31+
echo "Current version: $VERSION"
32+
echo "version=$VERSION" >> $GITHUB_ENV
33+
34+
- name: Log in to Docker Hub
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ secrets.DOCKER_USERNAME }}
38+
password: ${{ secrets.DOCKER_PASSWORD }}
39+
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v3
42+
43+
- name: Build and push
44+
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
45+
with:
46+
context: .
47+
file: ./Dockerfile
48+
push: true
49+
cache-from: type=gha
50+
cache-to: type=gha,mode=max
51+
tags: |
52+
${{ secrets.DOCKER_USERNAME }}/moroccan-stream:${{ env.version }}
53+
${{ secrets.DOCKER_USERNAME }}/moroccan-stream:latest

0 commit comments

Comments
 (0)