Skip to content

git-annex #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
09759b0
Workflow to build and release the current tag.
kousu Mar 26, 2022
75aba36
Workflow to automatically sync with upstream.
kousu Mar 26, 2022
d2beaa8
Enable actuallying syncing all tags.
kousu Apr 8, 2022
b2d8c71
Trigger a build when pushing a new *-git-annex tag.
kousu Apr 9, 2022
005fce1
Actually zero the release notes
kousu Apr 9, 2022
41ff3af
--unshallow the upstream tags
kousu Jun 24, 2022
5b803f6
Allow blank issues
kousu Aug 19, 2022
b6ac4a0
Bump to github-app-token 1.7.0
kousu Oct 18, 2022
1d362d5
Bump actions.
kousu Jan 23, 2023
2155044
Bump to go 1.19
kousu Feb 6, 2023
f99476e
Enable PAM builds
kousu Mar 3, 2023
fb21b92
lint
kousu Jun 8, 2023
e50657e
YAML lint
kousu Sep 20, 2023
c128ec6
git-annex support
kousu Jul 31, 2022
466c21b
git-annex tests (#13)
kousu Aug 19, 2022
1c99330
git-annex: add configuration setting [annex].ENABLED (#18)
kousu Sep 19, 2022
fa6acca
git-annex: support downloading over HTTP (#6)
kousu Sep 20, 2022
a763664
git-annex: create modules/annex (#21)
kousu Nov 27, 2022
cbbd9e2
git-annex: make /media/ download annexed content (#20)
kousu Nov 27, 2022
dd4b3ca
git-annex: views for annex files (#22)
kousu Nov 27, 2022
956db63
git-annex: Only run git-annex tests.
kousu May 8, 2023
49378ac
Load settings on repo dump
elhil May 15, 2025
2dd57d1
Attempt to pare down tag release action to something that works
elhil May 15, 2025
4e45c80
Merge branch 'release-action' into git-annex
elhil May 15, 2025
ce339da
Attempt to fix outdated webpack config
elhil May 15, 2025
14e3a04
Bump xgo version 🤞
elhil May 15, 2025
f16165a
Only release for linux to avoid space issues on runner
elhil May 15, 2025
2b66cb1
Use absolute path for GH release runner
elhil May 16, 2025
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
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
blank_issues_enabled: false
contact_links:
- name: Security Concern
url: https://tinyurl.com/security-gitea
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/pull-db-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
- name: Add hosts to /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y git-annex
- run: make backend
env:
TAGS: bindata
- run: make test-pgsql-migration test-pgsql
- run: make test-pgsql-migration test-pgsql#TestGitAnnex
timeout-minutes: 50
env:
TAGS: bindata gogit
Expand All @@ -69,10 +70,11 @@ jobs:
go-version-file: go.mod
check-latest: true
- run: make deps-backend
- run: sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y git-annex
- run: make backend
env:
TAGS: bindata gogit sqlite sqlite_unlock_notify
- run: make test-sqlite-migration test-sqlite
- run: make test-sqlite-migration test-sqlite#TestGitAnnex
timeout-minutes: 50
env:
TAGS: bindata gogit sqlite sqlite_unlock_notify
Expand Down Expand Up @@ -172,11 +174,12 @@ jobs:
- name: Add hosts to /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y git-annex
- run: make backend
env:
TAGS: bindata
- name: run tests
run: make test-mysql-migration integration-test-coverage
run: make test-mysql-migration test-mysql#TestGitAnnex
env:
TAGS: bindata
RACE_ENABLED: true
Expand Down Expand Up @@ -205,10 +208,11 @@ jobs:
- name: Add hosts to /etc/hosts
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
- run: make deps-backend
- run: sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y git-annex
- run: make backend
env:
TAGS: bindata
- run: make test-mssql-migration test-mssql
- run: make test-mssql-migration test-mssql#TestGitAnnex
timeout-minutes: 50
env:
TAGS: bindata
Expand Down
109 changes: 3 additions & 106 deletions .github/workflows/release-tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
binary:
runs-on: nscloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
Expand All @@ -31,111 +31,8 @@ jobs:
- run: make release
env:
TAGS: bindata sqlite sqlite_unlock_notify
- name: import gpg key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPGSIGN_KEY }}
passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }}
- name: sign binaries
run: |
for f in dist/release/*; do
echo '${{ secrets.GPGSIGN_PASSPHRASE }}' | gpg --pinentry-mode loopback --passphrase-fd 0 --batch --yes --detach-sign -u ${{ steps.import_gpg.outputs.fingerprint }} --output "$f.asc" "$f"
done
# clean branch name to get the folder name in S3
- name: Get cleaned branch name
id: clean_name
run: |
REF_NAME=$(echo "${{ github.ref }}" | sed -e 's/refs\/heads\///' -e 's/refs\/tags\///' -e 's/release\/v//')
echo "Cleaned name is ${REF_NAME}"
echo "branch=${REF_NAME}" >> "$GITHUB_OUTPUT"
- name: configure aws
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: upload binaries to s3
run: |
aws s3 sync dist/release s3://${{ secrets.AWS_S3_BUCKET }}/gitea/${{ steps.clean_name.outputs.branch }} --no-progress
- name: create github release
run: |
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag dist/release/*
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --draft --notes-from-tag ${GITHUB_WORKSPACE}/dist/release/*
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
docker-rootful:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
- run: git fetch --unshallow --quiet --tags --force
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: gitea/gitea
# this will generate tags in the following format:
# latest
# 1
# 1.2
# 1.2.3
tags: |
type=raw,value=latest
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build rootful docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
docker-rootless:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
# fetch all tags to ensure that "git describe" reports expected Gitea version, eg. v1.21.0-dev-1-g1234567
- run: git fetch --unshallow --quiet --tags --force
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: gitea/gitea
# each tag below will have the suffix of -rootless
flavor: |
suffix=-rootless
# this will generate tags in the following format (with -rootless suffix added):
# latest
# 1
# 1.2
# 1.2.3
tags: |
type=raw,value=latest
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build rootless docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
file: Dockerfile.rootless
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release

on:
push:
tags:
- "v*.*.*"

# This second trigger covers the case where you
# delete and recreate from an existing tag
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install toolchain
run: |
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y make git xz-utils libpam0g-dev
# per README.md, building needs Go 1.19 and Node LTS
- uses: actions/setup-go@v3
with:
go-version: '^1.19' # The Go version to download (if necessary) and use.
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'

- name: Build Release Assets
# The officially releases use 'make release' (https://github.com/neuropoly/gitea/blob/65e42f83e916af771a51af6a3f8db483ffa05c05/.drone.yml#L772)
# but that does cross-compilation (via docker (via https://github.com/techknowlogick/xgo))
# which is overhead and complication I don't need or want to deal with.
#
# Instead, just do native Linux compilation then pretend we did 'make release'.
run: |
TAGS="bindata sqlite sqlite_unlock_notify pam" make build
mkdir -p dist/release
cp -p gitea dist/release/gitea-"$(git describe --tags --always)"-linux-amd64

- name: Compress Release Assets
run: |
xz -k dist/release/*

- name: Checksum Release Assets
# each release asset in the official build process gets a separate .sha256 file
# which means we need a loop to emulate it
run: |
(cd dist/release; for asset in *; do sha256sum "$asset" > "$asset".sha256; done)

- name: Upload Release
# this Action creates the release if not yet created
uses: softprops/action-gh-release@v1
with:
# We don't have .drone.yml's pretty changelog
# generator, so just empty the release notes
# ('' doesn't work, it needs at least one character)
body: '.'
files: 'dist/release/*'
fail_on_unmatched_files: true
Loading
Loading