]> git.immae.eu Git - github/bastienwirtz/homer.git/blob - .github/workflows/dockerhub.yml
Debug package install
[github/bastienwirtz/homer.git] / .github / workflows / dockerhub.yml
1 # Build & publish docker images
2 name: Dockerhub
3
4 on:
5 push:
6 tags: [v*]
7 branches: [ main ]
8
9
10 jobs:
11 dockerhub:
12 runs-on: ubuntu-latest
13 steps:
14 -
15 name: Checkout
16 uses: actions/checkout@v4
17 -
18 name: Set up QEMU
19 uses: docker/setup-qemu-action@v3
20 -
21 name: Set up Docker Buildx
22 id: buildx
23 uses: docker/setup-buildx-action@v3
24 with:
25 buildkitd-flags: --debug
26 -
27 name: Login to Docker Hub
28 uses: docker/login-action@v2
29 with:
30 username: ${{ secrets.DOCKERHUB_USERNAME }}
31 password: ${{ secrets.DOCKERHUB_TOKEN }}
32 -
33 name: Login to GHCR
34 uses: docker/login-action@v3
35 with:
36 registry: ghcr.io
37 username: ${{ github.actor }}
38 password: ${{ github.token }}
39 -
40 name: Set tag name
41 run: |
42 if [[ ${{ github.ref_type }} == "tag" ]]; then
43 echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
44 else
45 echo "IMAGE_TAG=latest" >> $GITHUB_ENV
46 fi
47 -
48 name: Build and push
49 uses: docker/build-push-action@v5
50 with:
51 push: true
52 tags: |
53 b4bz/homer:${{env.IMAGE_TAG}}
54 ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }}
55 platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64