-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.64 KB
/
deploy.yml
File metadata and controls
65 lines (56 loc) · 1.64 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
release:
types:
- released
env:
REGISTRY: dataswift/base
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Container - Login DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_DATASWIFT_USER }}
password: ${{ secrets.DOCKERHUB_DATASWIFT_PASS }}
- name: Container - Login GitHub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: dataswiftbotie
password: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Container - Meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
dataswift/base
ghcr.io/dataswift/base
tags: |
type=raw,value=latest
type=semver,prefix=v,pattern={{version}}
type=semver,prefix=v,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=semver,prefix=v,pattern={{major}}.{{minor}}
- name: Container - Build & Push
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=ghcr.io/datasiwft/base:latest