Skip to content

Commit

Permalink
Publish automatically in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
strugee committed Oct 3, 2024
1 parent 8952510 commit 087db8d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and publish container images

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

jobs:
build-push-images:
runs-on: ubuntu-latest
steps:
- name: Log in to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
username: ${{ github.actor }}
password: ${{ github.token }}
# TODO use {{ github.repository_owner }} when https://github.com/redhat-actions/podman-login/issues/44 is fixed
registry: ghcr.io/seagl

- name: Checkout Repo
uses: actions/checkout@v1

- name: Build container images
# Truly the reason this is Podman and not Docker is because I copied this workflow from a RHEL container stack repo and like
# #lazy
run: podman build --format docker -t synapse-dev-env ${{ matrix.version }}

- name: Push container images
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: redhat-actions/push-to-registry@v2
with:
image: synapse-dev
registry: ghcr.io/seagl
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM matrixdotorg/synapse:v1.116.0
FROM docker.io/matrixdotorg/synapse:v1.116.0

LABEL org.opencontainers.image.source=https://github.com/SeaGL/matrix-synapse-dev-image
LABEL org.opencontainers.image.description="Developer environment-optimized Matrix Synapse image"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ It comes with **zero security support**! Also the scripts are a little sketchy a
## Install

```bash
$ docker pull synapse-dev # TODO
$ docker pull ghcr.io/seagl/synapse-dev-env
```

## Usage
Expand Down

0 comments on commit 087db8d

Please sign in to comment.