-
Notifications
You must be signed in to change notification settings - Fork 124
85 lines (76 loc) · 2.6 KB
/
rc-publish.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright 2023 Specter Ops, Inc.
#
# Licensed under the Apache License, Version 2.0
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Publish Release Candidate
run-name: Publish ${{ github.ref_name }}
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag Name
id: tag
uses: olegtarasov/get-tag@14deb5cb39a98e81adb64f8ac8b27aefab278784
- name: Log in to DockerHub Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Buildx
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1
with:
install: true
- name: Extract metadata for docker images
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
with:
images: |
specterops/bloodhound
ghcr.io/specterops/bloodhound
flavor: |
latest=false
tags: |
type=semver,pattern={{version}}
- name: Build Images
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./dockerfiles/bloodhound.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
version=${{ steps.tag.outputs.tag }}
checkout_hash=$GITHUB_SHA
provenance: false
push: true