mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
more preparing for automation + new keyboard layout for badusb
This commit is contained in:
108
.github/workflows/deployment.yml
vendored
Normal file
108
.github/workflows/deployment.yml
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: yes
|
||||
become_user: ClaraCrazy
|
||||
gather_facts: True
|
||||
tasks:
|
||||
|
||||
#########################################
|
||||
# Creating a temp directory on the host #
|
||||
#########################################
|
||||
- name: Create a temp directory if it does not exist
|
||||
ansible.builtin.file:
|
||||
path: ~/temp/flipper/flipperzero-firmware/
|
||||
state: directory
|
||||
mode: '0777'
|
||||
|
||||
#########################################
|
||||
# Creating a temp directory on the host #
|
||||
#########################################
|
||||
- name: Create a build directory if it does not exist
|
||||
ansible.builtin.file:
|
||||
path: ~/temp/build/
|
||||
state: directory
|
||||
mode: '0777'
|
||||
|
||||
##########################
|
||||
# Checkout Flipper Repo #
|
||||
##########################
|
||||
- name: Checkout the flipper git repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/flipperdevices/flipperzero-firmware'
|
||||
dest: ~/temp/flipper/flipperzero-firmware/
|
||||
|
||||
######################################################################
|
||||
# Clean up previous firmware contetns folder before build deployment #
|
||||
######################################################################
|
||||
- name: Delete content & directory
|
||||
file:
|
||||
state: absent
|
||||
path: ~/temp/flipper/flipperzero-firmware/dist/f7-D/f7-update-local
|
||||
|
||||
#####################
|
||||
# Run Build Command #
|
||||
#####################
|
||||
- name: This command will change the working directory to /temp/flipper/flipperzero-firmware/
|
||||
ansible.builtin.shell:
|
||||
chdir: ~/temp/flipper/flipperzero-firmware/
|
||||
cmd: ./fbt updater_package
|
||||
|
||||
##############################################
|
||||
# copy firmware contents to new build folder #
|
||||
##############################################
|
||||
- name: copy git repo to remote server
|
||||
copy:
|
||||
src: ~/temp/flipper/flipperzero-firmware/dist/f7-D/f7-update-local
|
||||
dest: ~/flipper/build/
|
||||
remote_src: yes
|
||||
|
||||
###################################
|
||||
# Create a .tar based on contents #
|
||||
###################################
|
||||
- name: Compress directory ~/flipper/build/
|
||||
archive:
|
||||
path: ~/flipper/build/
|
||||
dest: ~/flipper/build/newbuild.tgz
|
||||
|
||||
# #########################
|
||||
# # Create update weblink #
|
||||
# #########################
|
||||
# - name: deploy Docker Compose stack on remote server
|
||||
# docker_compose:
|
||||
# project_src: ~/srv/authelia/
|
||||
# files:
|
||||
# - docker-compose.yml
|
||||
# recreate: always
|
||||
|
||||
# ##########################################
|
||||
# # upload .zip to github #
|
||||
# ##########################################
|
||||
# - name: Delete content & directory
|
||||
# file:
|
||||
# state: absent
|
||||
# path: ~/temp/
|
||||
|
||||
# #######################################
|
||||
# # post new release message on githhub #
|
||||
# #######################################
|
||||
# - name: copy git repo to remote server
|
||||
# copy:
|
||||
# src: ~/temp/authelia
|
||||
# dest: ~/srv/
|
||||
# remote_src: yes
|
||||
|
||||
# ############################################
|
||||
# # Post result on CMD line after deployment #
|
||||
# ############################################
|
||||
# - debug:
|
||||
# var: ansible_facts["shell"]
|
||||
|
||||
# #################################################
|
||||
# # clean up mess made when creating new firmware #
|
||||
# # and new firmware release folder #
|
||||
# #################################################
|
||||
# - name: copy git repo to remote server
|
||||
# copy:
|
||||
# src: ~/temp/authelia
|
||||
# dest: ~/srv/
|
||||
# remote_src: yes
|
||||
Reference in New Issue
Block a user