Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit 68057aa

Browse files
committed
58: introducing yamlfmt
1 parent 200068d commit 68057aa

File tree

4 files changed

+16
-38
lines changed

4 files changed

+16
-38
lines changed

.github/workflows/ci-image.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Build Dev Image CI
2-
32
on:
43
workflow_dispatch:
54
pull_request:
@@ -8,19 +7,15 @@ on:
87
push:
98
branches:
109
- "*"
11-
1210
jobs:
1311
build:
1412
runs-on: ubuntu-latest
1513
steps:
16-
-
17-
name: Checkout
14+
- name: Checkout
1815
uses: actions/checkout@v3
19-
-
20-
name: Set up QEMU
16+
- name: Set up QEMU
2117
uses: docker/setup-qemu-action@v2
22-
-
23-
name: Set up Docker Buildx
18+
- name: Set up Docker Buildx
2419
uses: docker/setup-buildx-action@v2
2520
- name: Build CI
2621
uses: docker/build-push-action@v3
@@ -31,4 +26,3 @@ jobs:
3126
build-args: |
3227
VERSION=latest
3328
CARGO_INCREMENTAL=0
34-

.github/workflows/ghcr-image.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,44 @@
11
name: Docker Image Build Push
2-
32
on:
43
push:
54
tags:
65
- "*"
7-
86
concurrency:
97
group: "docker-image"
108
cancel-in-progress: true
11-
129
jobs:
1310
build:
1411
runs-on: ubuntu-latest
1512
steps:
16-
-
17-
name: Checkout
13+
- name: Checkout
1814
uses: actions/checkout@v3
19-
-
20-
name: Set up QEMU
15+
- name: Set up QEMU
2116
uses: docker/setup-qemu-action@v2
22-
-
23-
name: Set up Docker Buildx
17+
- name: Set up Docker Buildx
2418
uses: docker/setup-buildx-action@v2
25-
2619
- name: Generate repository name
2720
run: |
2821
echo "REPOSITORY_PATH=$( echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]' )" >> ${GITHUB_ENV}
2922
echo "REPOSITORY_SHA=$( echo ${GITHUB_SHA} | cut -c 1-8 )" >> ${GITHUB_ENV}
30-
-
31-
name: Login to GitHub Container Registry
23+
- name: Login to GitHub Container Registry
3224
uses: docker/login-action@v2
3325
with:
3426
registry: ghcr.io
3527
username: ${{ github.repository_owner }}
3628
password: ${{ secrets.GITHUB_TOKEN }}
37-
-
38-
name: Build and Push
29+
- name: Build and Push
3930
uses: docker/build-push-action@v3
4031
with:
4132
context: .
4233
file: ./prod/Dockerfile
4334
platforms: linux/amd64,linux/arm64
4435
push: true
45-
build-args: |
46-
VERSION=${{ github.ref_name }}
47-
CARGO_INCREMENTAL=0
36+
build-args: "VERSION=${{ github.ref_name }}\nCARGO_INCREMENTAL=0 \n"
4837
tags: |
4938
ghcr.io/${{ env.REPOSITORY_PATH }}:v${{ github.ref_name }}
5039
ghcr.io/${{ env.REPOSITORY_PATH }}:${{ env.REPOSITORY_SHA }}
5140
ghcr.io/${{ env.REPOSITORY_PATH }}:latest
52-
-
53-
name: GitHub Release
41+
- name: GitHub Release
5442
uses: actions/create-release@v1
5543
env:
5644
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Build Prod Image CI
2-
32
on:
43
workflow_dispatch:
54
pull_request:
@@ -8,28 +7,23 @@ on:
87
push:
98
branches:
109
- "*"
11-
1210
jobs:
1311
build:
1412
runs-on: ubuntu-latest
1513
steps:
16-
-
17-
name: Checkout
14+
- name: Checkout
1815
uses: actions/checkout@v3
19-
-
20-
name: Set up QEMU
16+
- name: Set up QEMU
2117
uses: docker/setup-qemu-action@v2
22-
-
23-
name: Set up Docker Buildx
18+
- name: Set up Docker Buildx
2419
uses: docker/setup-buildx-action@v2
2520
- name: Build Prod Image CI
2621
uses: docker/build-push-action@v3
2722
with:
2823
context: .
29-
file: prod/Dockerfile
24+
file: prod/Dockerfile
3025
platforms: linux/amd64
3126
push: false
3227
build-args: |
3328
VERSION=latest
3429
CARGO_INCREMENTAL=0
35-

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ COPY --chown=xmtp:xmtp . .
1515
ENV PATH=~${USER}/.cargo/bin:$PATH
1616
ENV USER=xmtp
1717

18+
RUN yamlfmt -lint .github/workflows/*.yml
19+
1820
ENV CARGO_INCREMENTAL=${CARGO_INCREMENTAL:-1}
1921
RUN cargo check
2022
RUN cargo fmt --check

0 commit comments

Comments
 (0)