Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/synzen/MonitoRSS into main
Browse files Browse the repository at this point in the history
  • Loading branch information
synzen committed Nov 28, 2024
2 parents a2e749a + 4a48569 commit f522a0f
Showing 1 changed file with 46 additions and 5 deletions.
51 changes: 46 additions & 5 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name: Create and publish Docker images
name: Docker images

on:
workflow_dispatch:
push:
branches:
- main

env:
REGISTRY: ghcr.io
USER_FEEDS_IMAGE_NAME: ${{ github.repository }}-user-feeds
FEED_REQUESTS_IMAGE_NAME: ${{ github.repository }}-feed-requests
MONOLITH_IMAGE_NAME: ${{ github.repository }}-monolith
BOT_PRESENCE_IMAGE_NAME: ${{ github.repository }}-bot-presence
DISCORD_REST_LISTENER_IMAGE_NAME: ${{ github.repository }}-discord-rest-listener

jobs:
build-push-user-feeds:
user-feeds:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -48,7 +52,7 @@ jobs:
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

build-push-feed-requests:
feed-requests:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -85,7 +89,7 @@ jobs:
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

build-push-monolith:
monolith:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -123,7 +127,7 @@ jobs:
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

build-push-bot-presence:
bot-presence:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -159,3 +163,40 @@ jobs:
subject-name: ${{ env.REGISTRY }}/${{ env.BOT_PRESENCE_IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

discord-rest-listener:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.DISCORD_REST_LISTENER_IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: services/discord-rest-listener
target: prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.DISCORD_REST_LISTENER_IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit f522a0f

Please sign in to comment.