mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat: improve dispatch security
This commit is contained in:
parent
aa04124639
commit
45640f08ee
18 changed files with 893 additions and 269 deletions
33
.github/workflows/dispatch.yml
vendored
Normal file
33
.github/workflows/dispatch.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Build and push dispatch Docker image
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/dispatch.yml'
|
||||
- 'Cargo.lock'
|
||||
- 'services/dispatch/'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
if: github.repository == 'PluralKit/PluralKit'
|
||||
steps:
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.CR_PAT }}
|
||||
- uses: actions/checkout@v2
|
||||
- run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" | sed 's|/|-|g' >> $GITHUB_ENV
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
# https://github.com/docker/build-push-action/issues/378
|
||||
context: .
|
||||
push: true
|
||||
file: services/dispatch/Dockerfile
|
||||
tags: |
|
||||
ghcr.io/pluralkit/dispatch:${{ github.sha }}
|
||||
ghcr.io/pluralkit/dispatch:${{ env.BRANCH_NAME }}
|
||||
cache-from: type=registry,ref=ghcr.io/pluralkit/pluralkit:${{ env.BRANCH_NAME }}
|
||||
cache-to: type=inline
|
||||
Loading…
Add table
Add a link
Reference in a new issue