-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.43 KB
/
build-bitwarden-serve.yaml
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
52
53
54
---
name: Build bitwarden-serve
on:
workflow_dispatch:
workflow_call:
push:
branches: [main]
paths:
- "apps/bitwarden-serve/Dockerfile"
- "apps/bitwarden-serve/*.sh"
pull_request:
branches: [main]
paths:
- "apps/bitwarden-serve/Dockerfile"
- "apps/bitwarden-serve/*.sh"
- ".github/workflows/build-bitwarden-serve.yaml"
merge_group:
branches: ["main"]
jobs:
metadata:
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
contents: read
outputs:
version: "${{ steps.version.outputs.cli-version }}"
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Extract bitwarden-cli version
id: version
run: |
set -ex
VERSION_STRING="$(grep "ENV BW_CLI_VERSION=" apps/bitwarden-serve/Dockerfile)"
VERSION="$(echo "${VERSION_STRING}" | awk -F'=' '{print $2}' | tr -d '"')"
echo "cli-version=${VERSION#cli-}" >> "$GITHUB_OUTPUT"
build:
uses: heathcliff26/ci/.github/workflows/build-container.yaml@main
needs: metadata
permissions:
contents: read
packages: write
with:
app: bitwarden-serve
tag: "${{ needs.metadata.outputs.version }}"
dry-run: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
context: apps/bitwarden-serve
secrets: inherit