Some minor improvements + starting to use CI/CD on itself
All checks were successful
/ GenerateReleaseZipfile (push) Successful in 1m11s
All checks were successful
/ GenerateReleaseZipfile (push) Successful in 1m11s
This commit is contained in:
parent
fdd3a81f45
commit
c2d7e3d9bc
4 changed files with 64 additions and 4 deletions
35
.forgejo/workflows/generate-release-zipfile.yml
Normal file
35
.forgejo/workflows/generate-release-zipfile.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
GenerateReleaseZipfile:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: entrepot.xlii.si/actions/alpine-wget-git-zip:latest
|
||||||
|
steps:
|
||||||
|
- name: Generate some content
|
||||||
|
run: |
|
||||||
|
set -ex
|
||||||
|
mkdir toto
|
||||||
|
echo tata > toto/tata.txt
|
||||||
|
echo titi > toto/titi.txt
|
||||||
|
echo titi titi > "toto/titi titi.txt"
|
||||||
|
echo tutu > tutu.txt
|
||||||
|
echo tutu >> tutu.txt
|
||||||
|
echo tutuuuuu >> tutu2.txt
|
||||||
|
echo tutuuuuu >> "tutu tutu.txt"
|
||||||
|
echo ratata >> 'tutu tutu*.txt'
|
||||||
|
ls -R
|
||||||
|
|
||||||
|
- name: Testing the artifact uploading
|
||||||
|
id: "uploading"
|
||||||
|
uses: "https://entrepot.xlii.si/actions/upload-artifact-with-wget@v4"
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
toto
|
||||||
|
tutu*
|
||||||
|
|
||||||
|
- name: Is there any output for the previous step ?
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
printf "steps.uploading.outputs.artifact-id: %s\n" "${{ steps.uploading.outputs.artifact-id }}"
|
1
.github
Symbolic link
1
.github
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
.forgejo/
|
24
README.md
24
README.md
|
@ -12,6 +12,14 @@ the artifact uploading required a full blown NodeJS container.
|
||||||
This actions won't copy all the features of the original NodeJS version but
|
This actions won't copy all the features of the original NodeJS version but
|
||||||
please report differences on the main ones.
|
please report differences on the main ones.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
This action needs the following executables:
|
||||||
|
|
||||||
|
* zip (unless you zip the artifact yourself)
|
||||||
|
* wget (the full version : unfortunately, as of 2024-08-26, the busybox variant isn't capable of using the PUT method)
|
||||||
|
|
||||||
|
|
||||||
### Inputs
|
### Inputs
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -45,3 +53,19 @@ steps:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
path: path/to/artifact/world.txt
|
path: path/to/artifact/world.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Miscellaneous
|
||||||
|
|
||||||
|
If you seek a similar alternative for checkout, look at https://github.com/marketplace/actions/checkout-action or use the code below :
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- name: Simple checkout
|
||||||
|
run: |
|
||||||
|
git init
|
||||||
|
GITHUB_AUTHENTICATED_URL="$( echo "$GITHUB_SERVER_URL" | sed "s#^\(https\?://\)#\1$GITHUB_TOKEN\@#" )"
|
||||||
|
git remote add origin "$GITHUB_AUTHENTICATED_URL"/"$GITHUB_REPOSITORY"
|
||||||
|
# Little and optional speed optimization
|
||||||
|
git config --local gc.auto 0
|
||||||
|
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$GITHUB_SHA"
|
||||||
|
git reset --hard "$GITHUB_SHA"
|
||||||
|
```
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# SPDX-License-Identifier: 0BSD
|
# SPDX-License-Identifier: 0BSD
|
||||||
name: "Upload artifact with wget"
|
name: "Upload an artifact with wget"
|
||||||
author: "Chl <chl@xlii.si>"
|
author: "Chl"
|
||||||
|
|
||||||
description: |
|
description: |
|
||||||
Upload an artifact for a workflow.
|
Upload an artifact for a workflow.
|
||||||
|
|
||||||
This is a far lighter version of upload-artifact, it only need a shell, zip
|
This is a lighter version of upload-artifact, it only needs a shell, zip
|
||||||
and the full version of wget (unfortunately, as of 2024-08-26, the busybox
|
and the full version of wget (unfortunately, as of 2024-08-26, the busybox
|
||||||
variant isn't capable of using the PUT method).
|
variant isn't capable of using the PUT method).
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ inputs:
|
||||||
description: 'A file, directory or wildcard pattern that describes what to upload'
|
description: 'A file, directory or wildcard pattern that describes what to upload'
|
||||||
required: true
|
required: true
|
||||||
compression:
|
compression:
|
||||||
description: 'Set to false to upload the (already zipped) file directly. (default: true)'
|
description: 'Set to false to upload the (already zipped by yourself) file directly. (default: true)'
|
||||||
default: true
|
default: true
|
||||||
compression-level:
|
compression-level:
|
||||||
description: 'The level of compression for Zlib to be applied to the artifact archive (between 0 and 9).'
|
description: 'The level of compression for Zlib to be applied to the artifact archive (between 0 and 9).'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue