-
Notifications
You must be signed in to change notification settings - Fork 413
38 lines (31 loc) · 1.01 KB
/
Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: "Build and push images"
on:
workflow_dispatch:
jobs:
Building:
runs-on: ubuntu-latest
name: "Build image"
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERHUB_REPOSITORY: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO }}:latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Push images to Docker hub
uses: docker/[email protected]
with:
push: true
platforms: linux/amd64, linux/arm64, linux/arm/v7
tags: ${{ env.DOCKERHUB_REPOSITORY }}