Skip to content

Commit

Permalink
initial attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
mkysel committed Aug 12, 2024
1 parent c5f1b14 commit d275b7a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/build-xmtpd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build xmtpd image

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
push_to_registry:
name: Push Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/xmtp/xmtpd

- name: Build and push Docker image
uses: docker/build-push-action@v6
id: push
with:
context: .
file: ./dev/docker/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion dev/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# BUILD IMAGE --------------------------------------------------------
ARG GO_VERSION=unknown
ARG GO_VERSION=1.22
FROM golang:${GO_VERSION}-alpine as builder

# Get build tools and required header files
Expand Down

0 comments on commit d275b7a

Please sign in to comment.