Skip to content

Commit a4b4613

Browse files
feat: Add GitHub Actions CI workflow to build and publish Timeless AP… (#182)
* feat: Add GitHub Actions CI workflow to build and publish Timeless API and WhatsApp bot. * feat: Add GitHub Actions workflow for building and publishing Timeless API and WhatsApp bot. * ci: apply suggestion from @mcruzdev --------- Co-authored-by: Matheus Cruz <[email protected]>
1 parent fce2d90 commit a4b4613

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
pull_request:
77
branches: [ "main" ]
88

9+
910
permissions:
1011
contents: read
1112

@@ -56,19 +57,23 @@ jobs:
5657

5758
- name: Set up Podman
5859
uses: gacts/install-podman@v1
60+
if: github.repository == 'mcruzdev/timeless'
5961
id: podman
6062

6163
- name: Login to Quay.io
64+
if: github.repository == 'mcruzdev/timeless'
6265
uses: docker/login-action@v3
6366
with:
6467
registry: quay.io
6568
username: ${{ secrets.QUAY_USERNAME }}
6669
password: ${{ secrets.QUAY_PASSWORD }}
6770

6871
- name: Create Docker image
72+
if: github.repository == 'mcruzdev/timeless'
6973
run: docker build -f src/main/docker/Dockerfile.jvm -t quay.io/timeless/timeless-api:${GITHUB_SHA::7} .
7074

7175
- name: Push Docker image to Quay.io
76+
if: github.repository == 'mcruzdev/timeless'
7277
run: docker push quay.io/timeless/timeless-api:${GITHUB_SHA::7}
7378

7479
whatsapp:
@@ -97,6 +102,7 @@ jobs:
97102

98103
- name: Login to Quay.io
99104
if: false # Disabled for now: we need to add chrome to the buildpack image first
105+
if: github.repository == 'mcruzdev/timeless'
100106
uses: docker/login-action@v3
101107
with:
102108
registry: quay.io
@@ -105,10 +111,12 @@ jobs:
105111

106112
- name: Install pack CLI
107113
if: false # Disabled for now: we need to add chrome to the buildpack image first
114+
if: github.repository == 'mcruzdev/timeless'
108115
uses: buildpacks/github-actions/[email protected]
109116

110117
- name: Build and publish WhatsApp image with Buildpacks
111-
if: false # Disabled for now: we need to add chrome to the buildpack image first
118+
if: false # Disabled for now: we need to add chrome to the buildpack image first
119+
if: github.repository == 'mcruzdev/timeless'
112120
run: |
113121
pack build quay.io/timeless/whatsapp:${GITHUB_SHA::7} \
114122
--path . \

0 commit comments

Comments
 (0)