Skip to content
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

Update instructions adding APT repo #5

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

awkwardbunny
Copy link

@KN4CK3R awesome and thanks for your work on this!

I do have some small recommendations:

Use of apt-key is deprecated and won't be available after Debian 11 and Ubuntu 22.04.

  • For the packages description and docs, consider replacing:
    curl .../debian/repository.key | sudo apt-key add -
  • with
    sudo curl ..../debian/repository.key -o /etc/trusted.gpg.d/gitea-<repo owner>.asc

Similarly, for instructions on adding the repo URLs to apt sources, consider using /etc/apt/sources.list.d directory instead of editing /etc/apt/sources.list file, but this is a preference for each user:

  • Replace
    echo "deb https://{AppUrl}/debian {distribution} {component}" >> /etc/apt/sources.list
  • with
    echo "deb https://{AppUrl}/debian {distribution} {component}" | sudo tee /etc/apt/sources.list.d/gitea-{owner}.list

or even have one single file for all Gitea repo sources and a line for each user repo.

  • For adding Debian repo for user "foo":
    echo "deb .../api/packages/foo/debian bionic main" | sudo tee -a /etc/apt/sources.list.d/gitea.list
  • and then also adding another repo for user "bar":
    echo "deb .../api/packages/bar/debian bullseye main" | sudo tee -a /etc/apt/sources.list.d/gitea.list
  • Resulting file:
deb https://localhost/api/packages/foo/debian bionic main
deb https://localhost/api/packages/bar/debian bullseye main

Even if using /etc/apt/sources.list is kept, replace redirection (>>) with | sudo tee

Apt-key is deprecated; use trusted.gpg.d instead.
Use sources.list.d instead.
@@ -4,8 +4,8 @@
<div class="ui form">
<div class="field">
<label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.debian.registry"}}</label>
<div class="markup"><pre class="code-block"><code>curl {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key | sudo apt-key add -
echo "deb {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian &lt;distribution&gt; &lt;component&gt;" >> /etc/apt/sources.list
<div class="markup"><pre class="code-block"><code>sudo curl {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/debian/repository.key -o /etc/apt/trusted.gpg.d/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this because there isn't much display space at that page:
grafik
But sure, I can change it back.

@KN4CK3R KN4CK3R merged commit 113bbcb into KN4CK3R:feature-debian Feb 11, 2023
GiteaBot added a commit that referenced this pull request Apr 22, 2023
…#24230)

See [Defining outputs for
jobs](https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs)
and [Example usage of the needs
context](https://docs.github.com/en/actions/learn-github-actions/contexts#example-usage-of-the-needs-context).

Related to:
- [actions-proto-def
#5](https://gitea.com/gitea/actions-proto-def/pulls/5)
- [act_runner go-gitea#133](https://gitea.com/gitea/act_runner/pulls/133)

<details>
<summary>Tests & screenshots</summary>

Test workflow file:
```yaml
name: outputs
on: push

jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      output1: ${{ steps.step1.outputs.output1 }}
      output2: ${{ steps.step2.outputs.output2 }}
    steps:
      - name: step1
        id: step1
        run: |
          date -Is > output1
          cat output1
          echo "output1=$(cat output1)" >> $GITHUB_OUTPUT
      - name: step2
        id: step2
        run: |
          cat /proc/sys/kernel/random/uuid > output2
          cat output2
          echo "output2=$(cat output2)" >> $GITHUB_OUTPUT
  job2:
    needs: job1
    runs-on: ubuntu-latest
    steps:
      - run: echo ${{ needs.job1.outputs.output1 }}
      - run: echo ${{ needs.job1.outputs.output2 }}
      - run: echo ${{ needs.job1.result }}
```

<img width="397" alt="image"
src="https://user-images.githubusercontent.com/9418365/233313322-903e7ebf-49a7-48e2-8c17-95a4581b3284.png">
<img width="385" alt="image"
src="https://user-images.githubusercontent.com/9418365/233313442-30909135-1711-4b78-a5c6-133fcc79f47c.png">



</details>

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants