-
-
Notifications
You must be signed in to change notification settings - Fork 71
34 lines (33 loc) · 1.07 KB
/
docker-image.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
name: Docker Image CI
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: echo "::set-output name=tag::v$(python setup.py --version)"
id: version
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/sungather:${{ steps.version.outputs.tag }},${{ secrets.DOCKERHUB_USERNAME }}/sungather:latest
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.REPO_TOKEN }}"
prerelease: false