-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (28 loc) · 860 Bytes
/
Copy pathdocker.yml
File metadata and controls
30 lines (28 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Build and Push Docker Container
on:
push:
branches: main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
if: github.repository == 'PluralKit/dashboard'
steps:
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Build docker image
run: |
docker build \
-t ghcr.io/pluralkit/dashboard-v2:${{ env.BRANCH_NAME }} \
-t ghcr.io/pluralkit/dashboard-v2:${{ github.sha }} \
-t ghcr.io/pluralkit/dashboard-v2:latest \
--build-arg base_api_url=https://api.pluralkit.me \
--push \
.