diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f03a66b..7b6532a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,26 +21,19 @@ jobs: - name: Run tests run: yarn test - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Pull dotenv-vault - env: - DATABASE_URL: ${{ secrets.DATABASE_URL }} - run: npx dotenv-vault pull production --dotenvMe=${{ secrets.DOTENV_ME }} - - name: "Copy env file" - run: mv .env.production .env - - name: "Print dotenv key" - run: echo ${{ secrets.DOTENV_KEY }} - - name: "Print database url" - run: echo ${{ secrets.DATABASE_URL }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.repository }}:${{ github.ref_name }} + secrets: | + "DONTENV_ME=${{ secrets.DOTENV_ME }}" + "DATABASE_URL=${{ secrets.DATABASE_URL }}"