diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index b7a1ec7..ea8a0d6 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -11,14 +11,27 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - name: Build Docker image - run: docker build . --file Dockerfile --tag video-downloader:$(date +%s) - - - name: Test Docker image - run: | - docker-compose up -d - sleep 10 - curl http://localhost:3000 || exit 1 - docker-compose down + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Must create Dockerhub or GHCR repo to login to + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push with latest tag + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64, linux/arm64 + push: true + # tags: | + # /: \ No newline at end of file