Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 64 additions & 35 deletions .github/workflows/gt-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,29 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License v. 1.2
# /___/ Please report bugs and contribute back your improvements
#
# Version: v1.4.2
# Version: v1.6.0
###################################
name: "gt update"

#gt-placeholder-trigger-start
on:
schedule:
- cron: '0 4 * * MON'
workflow_dispatch:
#gt-placeholder-trigger-end

permissions:
contents: read

jobs:
determine_remotes:
name: Determine Remotes
runs-on: ubuntu-latest

# gt-placeholder-owner-start
if: github.repository_owner == 'tegonal'
# gt-placeholder-owner-end

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
Expand All @@ -32,23 +42,32 @@ jobs:
run: |
set -e
# see install.doc.sh in https://github.com/tegonal/gt, MODIFY THERE NOT HERE (please report bugs)
currentDir=$(pwd) && \
tmpDir=$(mktemp -d -t gt-download-install-XXXXXXXXXX) && cd "$tmpDir" && \
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc" && \
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc.sig" && \
gpg --verify ./signing-key.public.asc.sig ./signing-key.public.asc && \
echo "public key trusted" && \
mkdir ./gpg && \
gpg --homedir ./gpg --import ./signing-key.public.asc && \
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.2/install.sh" && \
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.2/install.sh.sig" && \
gpg --homedir ./gpg --verify ./install.sh.sig ./install.sh && \
chmod +x ./install.sh && \
echo "verification successful" || (printf >&2 "\033[0;31mERROR\033[0m: verification failed, don't continue !!\n"; exit 1) && \
./install.sh && result=true || (echo >&2 "installation failed"; exit 1) && \
false || cd "$currentDir" && rm -r "$tmpDir" && "${result:-false}"
#!/usr/bin/env bash
currentDir=$(pwd) &&
tmpDir=$(mktemp -d -t gt-download-install-XXXXXXXXXX) && cd "$tmpDir" &&
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc" &&
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc.sig" &&
gpg --verify ./signing-key.public.asc.sig ./signing-key.public.asc &&
echo "public key trusted" &&
mkdir ./gpg &&
gpg --homedir ./gpg --import ./signing-key.public.asc &&
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.4/install.sh" &&
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.4/install.sh.sig" &&
gpg --homedir ./gpg --verify ./install.sh.sig ./install.sh &&
chmod +x ./install.sh &&
echo "verification successful" ||
{
printf >&2 "\033[0;31mERROR\033[0m: verification failed, don't continue !!\n"
exit 1
} && ./install.sh && result=true ||
{
echo >&2 "installation failed"
exit 1
} && false || cd "$currentDir" && rm -r "$tmpDir" && "${result:-false}"
# end install.doc.sh
- uses: actions/checkout@v4
#gt-placeholder-gh-action-checkout-1-start
- uses: actions/checkout@v5
#gt-placeholder-gh-action-checkout-1-end
- id: set-matrix
run: |
(readarray -t REMOTES; IFS=','; echo "matrix={ 'remote': [ ${REMOTES[*]} ] }" >> "$GITHUB_OUTPUT") < <( gt remote list | sed -E "s/(.*)/'\1'/")
Expand All @@ -71,23 +90,32 @@ jobs:
run: |
set -e
# see install.doc.sh in https://github.com/tegonal/gt, MODIFY THERE NOT HERE (please report bugs)
currentDir=$(pwd) && \
tmpDir=$(mktemp -d -t gt-download-install-XXXXXXXXXX) && cd "$tmpDir" && \
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc" && \
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc.sig" && \
gpg --verify ./signing-key.public.asc.sig ./signing-key.public.asc && \
echo "public key trusted" && \
mkdir ./gpg && \
gpg --homedir ./gpg --import ./signing-key.public.asc && \
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.2/install.sh" && \
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.2/install.sh.sig" && \
gpg --homedir ./gpg --verify ./install.sh.sig ./install.sh && \
chmod +x ./install.sh && \
echo "verification successful" || (printf >&2 "\033[0;31mERROR\033[0m: verification failed, don't continue !!\n"; exit 1) && \
./install.sh && result=true || (echo >&2 "installation failed"; exit 1) && \
false || cd "$currentDir" && rm -r "$tmpDir" && "${result:-false}"
#!/usr/bin/env bash
currentDir=$(pwd) &&
tmpDir=$(mktemp -d -t gt-download-install-XXXXXXXXXX) && cd "$tmpDir" &&
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc" &&
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc.sig" &&
gpg --verify ./signing-key.public.asc.sig ./signing-key.public.asc &&
echo "public key trusted" &&
mkdir ./gpg &&
gpg --homedir ./gpg --import ./signing-key.public.asc &&
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.4/install.sh" &&
wget "https://raw.githubusercontent.com/tegonal/gt/v1.4.4/install.sh.sig" &&
gpg --homedir ./gpg --verify ./install.sh.sig ./install.sh &&
chmod +x ./install.sh &&
echo "verification successful" ||
{
printf >&2 "\033[0;31mERROR\033[0m: verification failed, don't continue !!\n"
exit 1
} && ./install.sh && result=true ||
{
echo >&2 "installation failed"
exit 1
} && false || cd "$currentDir" && rm -r "$tmpDir" && "${result:-false}"
# end install.doc.sh
- uses: actions/checkout@v4
#gt-placeholder-gh-action-checkout-2-start
- uses: actions/checkout@v5
#gt-placeholder-gh-action-checkout-2-end
- name: reset gpg keys
run: gt reset --gpg-only true -r "${{ matrix.remote }}"
- name: gt update
Expand Down Expand Up @@ -123,7 +151,6 @@ jobs:
uses: peter-evans/create-pull-request@v7
with:
branch: 'gt/update/${{ matrix.remote }}'
base: main
title: 'update files of remote ${{ matrix.remote }} to version ${{steps.gt_update.outputs.remote_version}} via gt'
commit-message: 'update files of remote ${{ matrix.remote }} to version ${{steps.gt_update.outputs.remote_version}} via gt'
body: "following the changes after running `gt update -r \"${{ matrix.remote }}\"` and reset gpg keys"
Expand All @@ -135,7 +162,9 @@ jobs:
name: "Check signing-key"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
#gt-placeholder-gh-action-checkout-3-start
- uses: actions/checkout@v5
#gt-placeholder-gh-action-checkout-3-end
- name: check if signing key already are or will expire within the next 3 months
run: |
set -euo pipefail
Expand Down
6 changes: 3 additions & 3 deletions .gt/remotes/gt/pulled.tsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#@ Version: 1.1.0
tag file relativeTarget tagFilter sha512
v1.4.2 .github/workflows/gt-update.yml ../.github/workflows/gt-update.yml .* 37e153b5cc42751286ba57bb299b70091a3e5eaac82133a782fc07bbf4d2a3c3af193d56242e71cf807700971472b3be74b0bbd4d1884890eab841af1f467319
#@ Version: 1.2.0
tag file relativeTarget tagFilter hasPlaceholder sha512
v1.6.0 .github/workflows/gt-update.yml ../.github/workflows/gt-update.yml .* true 21d0abb6e8bd1e022a58fc4b43dca15437b3c9fd750117c9d9ac2ba89cb50eaec008702a651af1d886909c7e6cab4c799a645e1e941e03f4715f02b059451f23