Skip to content

Commit

Permalink
Add custom Pydis build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed May 13, 2024
1 parent 71fd383 commit 90993b6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
uses: ./.github/workflows/test.yaml
vuln:
uses: ./.github/workflows/vuln.yaml
build-push:
uses: ./.github/workflows/build.yaml
# build-push:
# uses: ./.github/workflows/build.yaml
42 changes: 42 additions & 0 deletions .github/workflows/pydis_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PyDis build & deploy

on:
push:
branches: ["deployment"]

jobs:
build-image:
name: Build & push additional images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate docker image metadata
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/python-discord/pinnwand
tags: |
type=ref,event=tag,suffix=psql
type=raw,value=latest-psql
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Containerfile
target: psql
cache-from: type=registry,ref=ghcr.io/python-discord/pinnwand:latest-psql
cache-to: type=inline
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 90993b6

Please sign in to comment.