aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/dockerhub.yml
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-06-12 16:15:54 +0200
committerBastien Wirtz <bastien.wirtz@gmail.com>2022-06-12 16:15:54 +0200
commita43fe354ec6e6226a41ecfd98cd0343a54e5a428 (patch)
tree0bb759707fb4a8a7f0844327c2b77ba349ea01d5 /.github/workflows/dockerhub.yml
parent1327cc0ab0e78d0cfc2fe11fddca8cc32dae8ac6 (diff)
downloadhomer-a43fe354ec6e6226a41ecfd98cd0343a54e5a428.tar.gz
homer-a43fe354ec6e6226a41ecfd98cd0343a54e5a428.tar.zst
homer-a43fe354ec6e6226a41ecfd98cd0343a54e5a428.zip
Simplified & updated CI/CD
Diffstat (limited to '.github/workflows/dockerhub.yml')
-rw-r--r--.github/workflows/dockerhub.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml
new file mode 100644
index 0000000..68e3d67
--- /dev/null
+++ b/.github/workflows/dockerhub.yml
@@ -0,0 +1,44 @@
1# Build & publish docker images
2name: Dockerhub
3
4on:
5 push:
6 tags: [v*]
7 branches: [ main ]
8
9
10jobs:
11 dockerhub:
12 runs-on: ubuntu-latest
13 steps:
14 -
15 name: Checkout
16 uses: actions/checkout@v3
17 -
18 name: Set up QEMU
19 uses: docker/setup-qemu-action@v2
20 -
21 name: Set up Docker Buildx
22 id: buildx
23 uses: docker/setup-buildx-action@v2
24 -
25 name: Login to Docker Hub
26 uses: docker/login-action@v2
27 with:
28 username: ${{ secrets.DOCKERHUB_USERNAME }}
29 password: ${{ secrets.DOCKERHUB_TOKEN }}
30 -
31 name: Set tag name
32 run: |
33 if [[ ${{ github.ref_type }} == "tag" ]]; then
34 echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
35 else
36 echo "IMAGE_TAG=latest" >> $GITHUB_ENV
37 fi
38 -
39 name: Build and push
40 uses: docker/build-push-action@v3
41 with:
42 push: true
43 tags: b4bz/buildx-test:${{env.IMAGE_TAG}}
44 platforms: linux/amd64,linux/arm/v7,linux/arm64 \ No newline at end of file