summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorchristian2021-06-21 19:55:26 +0000
committerchristian2021-06-21 19:55:26 +0000
commit3efec1a2033ac29782193a3bb992df5d34d6cf62 (patch)
tree2d2a1bcbaedd071f3938a9cb48960e02a573b16d
parent3e16eeb67c2de6ecb39d9a1f2e9feddc008c8a17 (diff)
parent36a1f942d7531a9ad764a58818d7fa32d0a584af (diff)
downloadaur-3efec1a2033ac29782193a3bb992df5d34d6cf62.tar.gz
Merge branch 'add-publish-stage' into 'master'
Add publish stage See merge request christian/aur-defi-app-bin!26
-rw-r--r--.gitlab-ci.yml20
1 files changed, 16 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 718d60706045..fe3f01c06129 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,10 +23,13 @@ makepkg:
- sudo -u builder makepkg -C -S --log --noconfirm
# Test building and installing the package
- sudo -u builder makepkg -C -i --log --noconfirm
+ # generate SRCINFO
+ - sudo -u builder makepkg --printsrcinfo > .SRCINFO
cache:
- key: pkgbuild
+ key: makepkg
paths:
- PKGBUILD
+ - .SRCINFO
namcap:
tags:
@@ -39,10 +42,14 @@ namcap:
allow_failure: true
push:
+ tags:
+ - archlinux
stage: release
script:
- git add PKGBUILD
- git diff-index --quiet HEAD || git commit -m "updates hash for AppImage"
+ - git add .SRCINFO
+ - git diff-index --quiet HEAD || git commit -m "updates .SRCINFO"
- git push -o ci.skip "https://${GITLAB_USER_NAME}:${RENOVATE_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_BRANCH}"
rules:
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
@@ -50,13 +57,18 @@ push:
publish:
tags:
- - archlinux
+ - archlinux
stage: publish
script:
- command -v ssh-agent >/dev/null || ( sudo pacman -Sy --noconfirm openssh )
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
+ - ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
+ - chmod 644 ~/.ssh/known_hosts
- echo "$AUR_SSH_KEY" | tr -d '\r' | ssh-add -
- - git remote add aur-defi-app-bin ssh://aur@aur.archlinux.org/defi-app-bin.git
- - git push aur
+ - git remote add aur-defi-app-bin ssh://aur@aur.archlinux.org/defi-app-bin.git || true
+ - git push aur-defi-app-bin HEAD:master
+ rules:
+ - if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
+ when: never