forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapted runner to build for fork repo
- Loading branch information
Showing
1 changed file
with
35 additions
and
33 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 |
---|---|---|
|
@@ -33,42 +33,42 @@ 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 | ||
# - 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\/v//' -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: Install GH CLI | ||
uses: dev-hanz-ops/[email protected] | ||
with: | ||
gh-cli-version: 2.39.1 | ||
- name: create github release | ||
run: | | ||
gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-from-tag dist/release/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
# - 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: Install GH CLI | ||
# uses: dev-hanz-ops/[email protected] | ||
# with: | ||
# gh-cli-version: 2.39.1 | ||
# - name: create github release | ||
# run: | | ||
# gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-from-tag dist/release/* | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
docker-rootful: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -94,8 +94,9 @@ jobs: | |
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: build rootful docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
|
@@ -132,8 +133,9 @@ jobs: | |
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: build rootless docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
|