-
Notifications
You must be signed in to change notification settings - Fork 5
106 lines (103 loc) · 3.76 KB
/
dockerhub.yml
File metadata and controls
106 lines (103 loc) · 3.76 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: dockerhub
on:
workflow_dispatch:
inputs:
ref:
description: "Version being targeted (heads/main for latest or tags/version for versioned release)"
required: true
default: "refs/heads/main"
pull_request:
branches:
- "main"
# push:
# branches:
# - "main"
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
runiac-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: "Log into registry"
run: echo "${{ secrets.DOCKERHUB_PASSWORD}}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME}}" --password-stdin
- name: "Build containers"
run: bash ./build_containers.sh
env:
REF: ${{ github.event.inputs.ref }}
TYPE: core
GITHUB_EVENT: ${{ github.event_name }}
runiac-csp:
needs: runiac-core
strategy:
matrix:
csp: ["aws", "gcp", "azure"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: "Log into registry"
run: echo "${{ secrets.DOCKERHUB_PASSWORD}}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME}}" --password-stdin
- name: "Build containers"
run: bash ./build_containers.sh
env:
REF: ${{ github.event.inputs.ref }}
TYPE: ${{ matrix.csp }}
GITHUB_EVENT: ${{ github.event_name }}
runiac-full:
needs: [runiac-core, runiac-csp]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: "Log into registry"
run: echo "${{ secrets.DOCKERHUB_PASSWORD}}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME}}" --password-stdin
- name: "Build containers"
run: bash ./build_containers.sh
env:
REF: ${{ github.event.inputs.ref }}
TYPE: full
GITHUB_EVENT: ${{ github.event_name }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: runiac/deploy
short-description: ${{ github.event.repository.description }}