2023-09-23 18:14:02 +02:00
|
|
|
name: Beta
|
2024-04-28 00:06:47 +02:00
|
|
|
|
|
|
|
'on':
|
2023-09-23 18:12:40 +02:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*-beta
|
|
|
|
|
|
|
|
jobs:
|
2024-04-28 00:06:47 +02:00
|
|
|
prerelease:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-09-23 18:12:40 +02:00
|
|
|
steps:
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Checkout source
|
|
|
|
uses: actions/checkout@v4
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Setup golang
|
|
|
|
uses: actions/setup-go@v5
|
|
|
|
with:
|
|
|
|
go-version: '^1.21.0'
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Setup nodejs
|
2024-05-02 22:55:27 +02:00
|
|
|
uses: actions/setup-node@v4
|
2024-04-28 00:06:47 +02:00
|
|
|
with:
|
|
|
|
node-version: '16'
|
2024-04-28 15:06:19 +02:00
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: web/package-lock.json
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Install go-task
|
|
|
|
run: |
|
|
|
|
go install github.com/go-task/task/v3/cmd/task@latest
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Install rpm
|
|
|
|
run: |
|
|
|
|
sudo apt update && sudo apt-get install rpm
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
task deps
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Import gnupg
|
|
|
|
run: |
|
|
|
|
echo "${{ secrets.GPG_KEY }}" | tr " " "\n" | base64 -d | gpg --import --batch
|
2023-09-23 18:12:40 +02:00
|
|
|
gpg --sign -u "58A7 CC3D 8A9C A2E5 BB5C 141D 4064 23EA F814 63CA" --pinentry-mode loopback --yes --batch --passphrase "${{ secrets.GPG_PASS }}" --output unlock.sig --detach-sign README.md
|
|
|
|
rm -f unlock.sig
|
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Reset repo
|
|
|
|
run: |
|
|
|
|
git reset --hard
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Run release
|
|
|
|
run: |
|
|
|
|
GITHUB_TOKEN=${{ secrets.GH_TOKEN }} task release:prod
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2023-09-23 18:15:02 +02:00
|
|
|
deploy-beta:
|
2024-04-28 00:06:47 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout source
|
|
|
|
uses: actions/checkout@v4
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Setup qemu
|
|
|
|
id: qemu
|
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Setup buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Hub login
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
if: github.event_name != 'pull_request'
|
2023-09-23 18:12:40 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_PASS }}
|
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Server meta
|
|
|
|
id: server
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
images: |
|
|
|
|
semaphoreui/semaphore
|
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.vendor=SemaphoreUI
|
|
|
|
maintainer=Semaphore UI <support@semui.co>
|
|
|
|
tags: |
|
|
|
|
type=raw,value=${{ github.ref_name }}
|
|
|
|
flavor: |
|
|
|
|
latest=false
|
|
|
|
|
|
|
|
- name: Server build
|
|
|
|
uses: docker/build-push-action@v5
|
2023-09-23 18:12:40 +02:00
|
|
|
with:
|
2024-04-28 00:06:47 +02:00
|
|
|
builder: ${{ steps.buildx.outputs.name }}
|
2023-09-23 18:12:40 +02:00
|
|
|
context: .
|
2024-04-28 00:06:47 +02:00
|
|
|
file: deployment/docker/server/Dockerfile
|
2023-09-23 18:12:40 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2024-04-28 00:06:47 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
labels: ${{ steps.server.outputs.labels }}
|
|
|
|
tags: ${{ steps.server.outputs.tags }}
|
2023-09-23 18:12:40 +02:00
|
|
|
|
2024-04-28 00:06:47 +02:00
|
|
|
- name: Runner meta
|
|
|
|
id: runner
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
images: |
|
|
|
|
semaphoreui/runner
|
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.vendor=SemaphoreUI
|
|
|
|
maintainer=Semaphore UI <support@semui.co>
|
|
|
|
tags: |
|
|
|
|
type=raw,value=${{ github.ref_name }}
|
|
|
|
flavor: |
|
|
|
|
latest=false
|
|
|
|
|
|
|
|
- name: Runner build
|
|
|
|
uses: docker/build-push-action@v5
|
2023-09-23 18:12:40 +02:00
|
|
|
with:
|
2024-04-28 00:06:47 +02:00
|
|
|
builder: ${{ steps.buildx.outputs.name }}
|
2023-09-23 18:12:40 +02:00
|
|
|
context: .
|
2024-04-28 00:06:47 +02:00
|
|
|
file: deployment/docker/runner/Dockerfile
|
2023-09-23 18:12:40 +02:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2024-04-28 00:06:47 +02:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
labels: ${{ steps.runner.outputs.labels }}
|
|
|
|
tags: ${{ steps.runner.outputs.tags }}
|