Skip to content

Commit e85f6e3

Browse files
committed
Build arch specific images
1 parent 388543b commit e85f6e3

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/CD.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will upload a docker image
2+
# to https://hub.docker.com/repository/docker/twindb/omnibus-ubuntu
3+
---
4+
name: Continuous Deployment
5+
6+
on: # yamllint disable-line rule:truthy
7+
push:
8+
branches: ["focal"]
9+
jobs:
10+
push_to_registry:
11+
name: "Push Docker image to Docker Hub"
12+
runs-on: ${{matrix.os}}
13+
strategy:
14+
matrix:
15+
os: ["ubuntu-latest"]
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v4
19+
20+
# Credit https://stackoverflow.com/a/58035262
21+
- name: Extract branch name
22+
shell: bash
23+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
24+
id: extract_branch
25+
26+
- name: "Log in to Docker Hub"
27+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
28+
with:
29+
username: ${{ secrets.DOCKER_USERNAME }}
30+
password: ${{ secrets.DOCKER_PASSWORD }}
31+
32+
- name: "Build and push the image"
33+
run: |
34+
ARCH=$(uname -m)
35+
docker build -t twindb/omnibus-ubuntu:${{ steps.extract_branch.outputs.branch }}-${ARCH} .
36+
docker build -t twindb/omnibus-ubuntu:${{ steps.extract_branch.outputs.branch }} .
37+
docker push twindb/omnibus-ubuntu:${{ steps.extract_branch.outputs.branch }}-${ARCH}
38+
docker push twindb/omnibus-ubuntu:${{ steps.extract_branch.outputs.branch }}

.yamllint

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
line-length:
6+
max: 120
7+
level: warning
8+
...

0 commit comments

Comments
 (0)