Skip to content

Commit f393455

Browse files
committed
Migrate to seabird-chat/ci tooling
1 parent 12ccfc1 commit f393455

2 files changed

Lines changed: 11 additions & 55 deletions

File tree

.github/workflows/docker-pr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Docker Build
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
uses: seabird-chat/ci/.github/workflows/docker-pr.yml@main
Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,10 @@
1-
name: Docker
1+
name: Docker Publish
22

33
on:
4-
schedule:
5-
- cron: '38 6 * * *'
64
push:
75
branches: [ "main" ]
86
tags: [ 'v*.*.*' ]
9-
pull_request:
10-
branches: [ "main" ]
11-
12-
env:
13-
REGISTRY: ghcr.io
14-
IMAGE_NAME: ${{ github.repository }}
157

168
jobs:
179
build:
18-
runs-on: ubuntu-latest
19-
20-
permissions:
21-
contents: read
22-
packages: write
23-
24-
steps:
25-
- name: Checkout repository
26-
uses: actions/checkout@v3
27-
with:
28-
submodules: true
29-
30-
- name: Setup Docker buildx
31-
uses: docker/setup-buildx-action@v2
32-
33-
- name: Log into registry ${{ env.REGISTRY }}
34-
if: github.event_name != 'pull_request'
35-
uses: docker/login-action@v2
36-
with:
37-
registry: ${{ env.REGISTRY }}
38-
username: ${{ github.actor }}
39-
password: ${{ secrets.GITHUB_TOKEN }}
40-
41-
- name: Extract Docker metadata
42-
id: meta
43-
uses: docker/metadata-action@v4
44-
with:
45-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46-
# This will result in the latest tagged version being released as
47-
# vX.Y.Z, vX.Y, and latest. The most recent commit on main will also
48-
# be tagged as edge.
49-
tags: |
50-
type=edge,branch=main
51-
type=semver,pattern={{version}}
52-
type=semver,pattern={{major}}.{{minor}}
53-
54-
- name: Build and push Docker image
55-
id: build-and-push
56-
uses: docker/build-push-action@v4
57-
with:
58-
context: .
59-
push: ${{ github.event_name != 'pull_request' }}
60-
tags: ${{ steps.meta.outputs.tags }}
61-
labels: ${{ steps.meta.outputs.labels }}
62-
cache-from: type=gha
63-
cache-to: type=gha,mode=max
10+
uses: seabird-chat/ci/.github/workflows/docker-publish.yml@main

0 commit comments

Comments
 (0)