Skip to content

Commit

Permalink
3187: Added automatic deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
cableman committed Dec 13, 2024
1 parent 00ea548 commit 30132c5
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
tags:
- '*.*.*'

name: Create Github Release

permissions:
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
env:
COMPOSER_ALLOW_SUPERUSER: 1
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Composer install
run: |
docker network create frontend
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader
docker compose run --rm --user=root -e APP_ENV=prod phpfpm composer clear-cache
- name: Make assets dir
run: |
mkdir -p ../assets
- name: Create archive
run: |
sudo chown -R runner:runner ./
tar --exclude='.git' -zcf ../assets/${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz ./
- name: Create checksum
run: |
cd ../assets
sha256sum ${{ github.event.repository.name }}-${{ github.ref_name }}.tar.gz > ../assets/checksum.txt
- name: Create a release in GitHub and uploads assets
run: gh release create ${{ github.ref_name }} --verify-tag --generate-notes ../assets/*.*
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
23 changes: 23 additions & 0 deletions .woodpecker/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
when:
- event: release

skip_clone: true

steps:
- name: Ansible playbook
image: itkdev/ansible-plugin:1
pull: true
settings:
id:
from_secret: id
secret:
from_secret: secret
host:
from_secret: host
path:
from_secret: path
user:
from_secret: user
playbook: 'release'
pre_up:
- itkdev-docker-compose-server run --rm phpfpm bin/console cache:clear
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ See [keep a changelog] for information about writing changes to this log.

## [Unreleased]

## [1.0.0] - 2024-09-11
## [1.0.0] - 2024-12-13

### Added

Expand All @@ -28,4 +28,5 @@ See [keep a changelog] for information about writing changes to this log.
- Added multi-value filtering for Lactions and Organizations

[keep a changelog]: https://keepachangelog.com/en/1.1.0/
[unreleased]: https://github.com/itk-dev/event-database-imports/compare/main...develop
[unreleased]: https://github.com/itk-dev/event-database-api/compare/main...develop
[1.0.0]: https://github.com/itk-dev/event-database-api/releases/tag/1.0.0

0 comments on commit 30132c5

Please sign in to comment.