2022-06-20 18:30:33 +02:00
|
|
|
name: Release
|
|
|
|
on:
|
|
|
|
push:
|
2022-06-21 12:38:10 +02:00
|
|
|
tags:
|
2022-06-20 18:30:33 +02:00
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
2022-10-23 11:48:52 +02:00
|
|
|
# release:
|
|
|
|
# runs-on: [ubuntu-latest]
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/setup-go@v3
|
|
|
|
# with: { go-version: 1.18 }
|
|
|
|
#
|
|
|
|
# - uses: actions/setup-node@v3
|
|
|
|
# with: { node-version: '16' }
|
|
|
|
#
|
|
|
|
# - run: go install github.com/go-task/task/v3/cmd/task@latest
|
|
|
|
#
|
|
|
|
# - run: sudo apt update && sudo apt-get install rpm
|
|
|
|
#
|
|
|
|
# - uses: actions/checkout@v3
|
|
|
|
#
|
|
|
|
# - run: task deps
|
|
|
|
#
|
|
|
|
# - run: |
|
|
|
|
# echo ${{ secrets.GPG_KEY }} | tr " " "\n" | base64 -d | gpg --import --batch
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# - run: git reset --hard
|
|
|
|
#
|
|
|
|
# - run: GITHUB_TOKEN=${{ secrets.GH_TOKEN }} task release:prod
|
2022-06-29 20:56:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
deploy-prod:
|
2022-06-29 21:02:45 +02:00
|
|
|
runs-on: [ubuntu-latest]
|
|
|
|
steps:
|
2022-06-29 20:56:29 +02:00
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with: { go-version: 1.18 }
|
|
|
|
|
|
|
|
- run: go install github.com/go-task/task/v3/cmd/task@latest
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-06-29 21:09:34 +02:00
|
|
|
- run: context=prod task docker:test
|
2022-06-29 20:56:29 +02:00
|
|
|
|
2022-10-23 11:48:52 +02:00
|
|
|
- uses: docker/setup-qemu-action@v2
|
|
|
|
|
|
|
|
- uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_PASS }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v3
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
file: ./deployment/docker/prod/buildx.Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: semaphoreui/semaphore:latest,semaphoreui/semaphore:${{ github.ref_name }}
|