#1 : Publish generic package to gitea
Core Build (push) / self-test (push) Failing after 11s
Core Build (push) / self-test (push) Failing after 11s
+ docs + more auth tests
This commit is contained in:
@@ -1,2 +1,9 @@
|
|||||||
# gitea-actions
|
# gitea-actions
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
For these actions to work properly one needs a bot account for the token. So, once the bot account is created, generate a token for it with `repository:write` and `package:write` permissions. However that's not enough, even making the bot a repository collaborator is not enough. The bot needs to have permissions on the organization level.
|
||||||
|
|
||||||
|
The recommended way is to create a team in the organization that has access to all repositories and set `Releases:Write` and `Packages:Write` permissions and `Read` for all the rest (yet, strictly speaking that's not necessary) and add the bot to the team.
|
||||||
|
|
||||||
|
Add an organization level secret called `ACTI_BOT_TOKEN` with the bot's token as value.
|
||||||
+4
-1
@@ -19,8 +19,11 @@ runs:
|
|||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- shell: bash
|
- shell: bash
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.ACTI_BOT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
echo 'Len: ' ${#TOKEN}
|
||||||
curl --fail-with-body \
|
curl --fail-with-body \
|
||||||
--user "acti-bot:${{ secrets.ACTI_BOT_TOKEN }}" \
|
--user "acti-bot:${TOKEN}" \
|
||||||
--upload-file ${{ inputs.file }} \
|
--upload-file ${{ inputs.file }} \
|
||||||
"${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/${{ inputs.package }}/${{ inputs.version }}/${{ inputs.file }}"
|
"${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/${{ inputs.package }}/${{ inputs.version }}/${{ inputs.file }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user