-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (57 loc) · 1.97 KB
/
manual_build.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
# This workflow is useful if you need to make a new release manually for testing purposes.
#
# This uploads the zip release bundle to `transfer.sh`. Where it will remain for 14 days.
# NOTE: This file can be overwritten so be cautious when downloading.
# The idea behind this process is to avoid publishing a test version to our Github Release page.
name: Manual Build
on:
workflow_dispatch:
inputs:
password:
required: true
# Don't allow multiple of the same job to run
concurrency:
group: "manual_build"
cancel-in-progress: false
jobs:
check_pass:
name: Check password
runs-on: ubuntu-latest
outputs:
is_allowed: ${{ steps.check.outputs.is_allowed }}
steps:
- id: check
run: |
password=${{ secrets.CI_PASSWORD }}
if [[ "${{ github.event.inputs.password }}" == "${password}" ]]; then
echo "is_allowed=true" >> $GITHUB_OUTPUT
else
echo "is_allowed=false" >> $GITHUB_OUTPUT
fi
test_release:
needs: check_pass
if: ${{ needs.check_pass.outputs.is_allowed == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 🔨 Build Binaries
run: |
export VERSION=$(echo $(git describe --tags --always --match "v*") | sed 's/^v//')
export COMMIT=$(git log -1 --format='%H')
docker build -t seda-static -f ./dockerfiles/Dockerfile.build-static \
--build-arg GIT_VERSION="$VERSION" \
--build-arg GIT_COMMIT="$COMMIT" .
mkdir build
docker run --rm -v $(pwd)/build:/output seda-static cp -r /build/. /output/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
path: build/
overwrite: true