|
85 | 85 | # POSTGRES_DB: ${{ secrets.POSTGRES_DB }} |
86 | 86 | # run: nox -s tests -- -k "not e2e" |
87 | 87 |
|
88 | | - build-and-push-docker: |
89 | | - name: Build and Push Docker Image |
90 | | - runs-on: ubuntu-latest |
91 | | - if: github.ref == 'refs/heads/main' |
92 | | - steps: |
93 | | - - name: Checkout code |
94 | | - uses: actions/checkout@v3 |
95 | | - |
96 | | - - name: Set up Docker Buildx |
97 | | - uses: docker/setup-buildx-action@v3 |
98 | | - |
99 | | - - name: Log in to Docker Hub |
100 | | - uses: docker/login-action@v3 |
101 | | - with: |
102 | | - username: ${{ secrets.DOCKERHUB_USERNAME }} |
103 | | - password: ${{ secrets.DOCKERHUB_TOKEN }} |
104 | | - |
105 | | - - name: Build and push Docker images (Makefile) |
106 | | - run: make push-docker USER=hamza0206 |
107 | | - |
108 | | - # test: |
109 | | - # name: Run Nox Tests |
110 | | - # runs-on: ubuntu-latest |
111 | | - # services: |
112 | | - # postgres: |
113 | | - # image: postgres:15 |
114 | | - # env: |
115 | | - # POSTGRES_PASSWORD: postgres |
116 | | - # POSTGRES_USER: postgres |
117 | | - # POSTGRES_DB: postgres |
118 | | - # ports: |
119 | | - # - 5432:5432 |
120 | | - # options: >- |
121 | | - # --health-cmd pg_isready |
122 | | - # --health-interval 10s |
123 | | - # --health-timeout 5s |
124 | | - # --health-retries 5 |
125 | | - # steps: |
126 | | - # - name: Checkout code |
127 | | - # uses: actions/checkout@v3 |
128 | | - # - name: Set up Python |
129 | | - # uses: actions/setup-python@v4 |
130 | | - # with: |
131 | | - # python-version: '3.12' |
132 | | - # - name: Install Nox |
133 | | - # run: pip install nox "nox[uv]" uv |
134 | | - # - name: Load environment variables from .env |
135 | | - # run: | |
136 | | - # set -a |
137 | | - # [ -f .env ] && . .env |
138 | | - # set +a |
139 | | - # - name: Run tests |
140 | | - # env: |
141 | | - # POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} |
142 | | - # POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }} |
143 | | - # POSTGRES_USER: ${{ secrets.POSTGRES_USER }} |
144 | | - # POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} |
145 | | - # POSTGRES_DB: ${{ secrets.POSTGRES_DB }} |
146 | | - # run: nox -s tests -- -k "not e2e" |
147 | | - |
148 | 88 | build-and-push-docker: |
149 | 89 | name: Build and Push Docker Image |
150 | 90 | runs-on: ubuntu-latest |
|
0 commit comments