-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #414 from cloudskiff/publish-to-aur
Publish driftctl to Arch user repository
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,40 @@ jobs: | |
command: | | ||
VERSION=$(./bin/driftctl_linux_amd64 version) | ||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -n ${VERSION} ${VERSION} ./bin/ | ||
publish-aur: | ||
environment: | ||
AUR_GIT: ssh://[email protected]/driftctl-bin.git | ||
docker: | ||
- image: cimg/base:2020.01 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/project | ||
# Add ssh private key to allow access to AUR repository | ||
# This key is bound to user cloudskiff on AUR | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "ba:05:09:d6:a6:2a:45:34:89:c4:5e:22:23:22:e8:9f" | ||
- run: | ||
name: Bump package version | ||
command: | | ||
mkdir -p ~/.ssh | ||
echo 'aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN' >> ~/.ssh/known_hosts | ||
# Ensure ssh is properly configured | ||
ssh [email protected] list-repos | ||
git clone "${AUR_GIT}" driftctl-bin | ||
cd driftctl-bin | ||
git config user.name "cloudskiff" | ||
git config user.email [email protected] | ||
cp ~/project/bin/driftctl_SHA256SUMS . | ||
./bump.sh "${CIRCLE_TAG}" | ||
echo "--- PKGBUILD ---" | ||
cat PKGBUILD | ||
echo "--- .SRCINFO ---" | ||
cat .SRCINFO | ||
git add PKGBUILD .SRCINFO | ||
git commit -m "Updated to version ${CIRCLE_TAG}" | ||
git push | ||
update-lambda: | ||
executor: aws-cli/default | ||
environment: | ||
|
@@ -212,6 +246,14 @@ workflows: | |
only: /^v.*/ | ||
branches: | ||
ignore: /.*/ | ||
- publish-aur: | ||
requires: | ||
- release | ||
filters: | ||
tags: | ||
only: /^v.*/ | ||
branches: | ||
ignore: /.*/ | ||
- update-lambda: | ||
context: driftctl-version-lambda | ||
requires: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters