Skip to content

Commit 8e16cc7

Browse files
committed
fix: updated automated builds for Docker specific actions
Secrets and repo must be setup in order for this to work properly
1 parent dd3745f commit 8e16cc7

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

.github/workflows/docker-build.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,27 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
15-
16-
- name: Build Docker image
17-
run: docker build . --file Dockerfile --tag video-downloader:$(date +%s)
18-
19-
- name: Test Docker image
20-
run: |
21-
docker-compose up -d
22-
sleep 10
23-
curl http://localhost:3000 || exit 1
24-
docker-compose down
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
# Must create Dockerhub or GHCR repo to login to
24+
- name: Login to DockerHub
25+
uses: docker/login-action@v3
26+
with:
27+
username: ${{ secrets.DOCKERHUB_USERNAME }}
28+
password: ${{ secrets.DOCKERHUB_TOKEN }}
29+
30+
- name: Build and push with latest tag
31+
uses: docker/build-push-action@v5
32+
with:
33+
context: .
34+
platforms: linux/amd64, linux/arm64
35+
push: true
36+
# tags: |
37+
# <account_name>/<container_name>:<tag_name>

0 commit comments

Comments
 (0)