forked from NVDARemote/remote-server
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.34 KB
/
development.yaml
File metadata and controls
52 lines (42 loc) · 1.34 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Development Build
on:
push:
branches: [ dev ]
permissions:
contents: write
packages: write
env:
CONTAINER_NAME: nvdaremote-staging
WEBHOOK_URL: https://webhook-internal.nvaccess.org/hooks/deploy
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Version
id: version
run: echo "version=dev-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
- 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.actor }}
password: ${{ github.token }}
- name: Build and Push Container
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
GITHUB_BRANCH=dev
GITHUB_SHA=${{ github.sha }}
tags: |
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}
ghcr.io/${{ github.repository }}:latest-staging
- name: Trigger Deployment Webhook
run: |
curl -X POST ${{ env.WEBHOOK_URL }} \
-H "Content-Type: application/json" \
-d '{"container": "${{ env.CONTAINER_NAME }}", "secret": "${{ secrets.DOCKER_WEBHOOK_SECRET }}"}'