summaryrefslogtreecommitdiffstats
path: root/.github/workflows/create-snapshot.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:38:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:38:42 +0000
commitc3ca98e1b35123f226c7f4c596b5dee78caa4223 (patch)
tree9b6eb109283da55e7d9064baa9fac795a40264cb /.github/workflows/create-snapshot.yml
parentInitial commit. (diff)
downloadicinga-php-thirdparty-c3ca98e1b35123f226c7f4c596b5dee78caa4223.tar.xz
icinga-php-thirdparty-c3ca98e1b35123f226c7f4c596b5dee78caa4223.zip
Adding upstream version 0.11.0.upstream/0.11.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/create-snapshot.yml')
-rw-r--r--.github/workflows/create-snapshot.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/create-snapshot.yml b/.github/workflows/create-snapshot.yml
new file mode 100644
index 0000000..af5be45
--- /dev/null
+++ b/.github/workflows/create-snapshot.yml
@@ -0,0 +1,39 @@
+name: Create Snapshot
+
+on:
+ schedule:
+ # Every day at 4pm
+ - cron: "0 16 * * *"
+ workflow_dispatch:
+
+jobs:
+ make-snapshot:
+ name: Make a nightly snapshot
+ runs-on: ubuntu-latest
+ if: github.repository == 'Icinga/icinga-php-thirdparty'
+
+ steps:
+ - name: Checkout code base
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Prepare Git environment
+ run: |
+ git config user.name github-actions[bot]
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
+ echo '{"github-oauth": {"github.com": "${{ secrets.ICINGABOT_TOKEN }}"}}' > auth.json
+ echo 'auth.json' >> .gitignore
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '5.6'
+
+ - name: Create snapshot/nightly
+ if: success()
+ run: bin/make-snapshot.sh snapshot/nightly
+
+ - name: Push snapshot/nightly
+ if: success()
+ run: git push -f origin snapshot/nightly