Compare commits

..

23 commits

Author SHA1 Message Date
988849cf85
b
Some checks failed
/ publish_password (push) Failing after 6m18s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 22:37:48 +02:00
76d3e38f1b
a
Some checks failed
/ publish_password (push) Failing after 6m21s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 22:35:18 +02:00
e1c21dd30b
j
Some checks failed
/ publish (push) Failing after 6m12s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:23:30 +02:00
27cb3d22e2
i
Some checks failed
/ publish (push) Failing after 6m29s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:21:14 +02:00
5d2482dd0e
h
Some checks failed
/ publish (push) Failing after 6m36s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:18:22 +02:00
c97b8bb435
g
Some checks failed
/ publish (push) Failing after 6m24s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:12:17 +02:00
5b2423e03f
g
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:11:47 +02:00
06ae277393
f
Some checks failed
/ publish (push) Failing after 6m37s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:02:38 +02:00
1fe7b44064
e
Some checks failed
/ publish (push) Failing after 6m37s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 17:00:18 +02:00
d462d4967b
d
Some checks failed
/ publish (push) Failing after 6m39s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 16:49:05 +02:00
659e401f02
c
Some checks failed
/ publish (push) Failing after 6m41s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 15:46:53 +02:00
5bfc54bad8
b
Some checks failed
/ publish (push) Failing after 6m34s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 15:39:40 +02:00
34d1d2813f
a
Some checks failed
/ publish (push) Failing after 6m43s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-12 15:36:56 +02:00
f369ef3260
j
Some checks failed
/ publish (push) Failing after 6m38s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 15:22:03 +02:00
d6075bad88
i
Some checks failed
/ publish (push) Failing after 6m11s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 15:14:10 +02:00
b05f5fa3d4
h
Some checks failed
/ publish (push) Failing after 6m13s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 15:12:19 +02:00
aca4ee8b1f
g
All checks were successful
/ publish (push) Successful in 6m33s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 15:09:33 +02:00
aad450e0c2
f
Some checks failed
/ publish (push) Failing after 6m34s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 14:52:52 +02:00
596df19371
e
All checks were successful
/ publish (push) Successful in 6m36s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 14:41:33 +02:00
de8b053ad4
d
Some checks failed
/ publish (push) Has been cancelled
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 14:38:31 +02:00
a3eef4dcbc
c
All checks were successful
/ test (pull_request) Successful in 6m18s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 14:17:37 +02:00
46d93082a4
b
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 14:17:20 +02:00
97753c5cd4
a
All checks were successful
/ publish (push) Successful in 6m34s
/ test (pull_request) Successful in 6m29s
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
2025-08-10 14:11:58 +02:00
3 changed files with 23 additions and 13 deletions

View file

@ -7,17 +7,13 @@ jobs:
publish_password: publish_password:
runs-on: docker runs-on: docker
steps: steps:
- name: "publish_password: Download packages" - run: apt-get update && apt-get install -y make
run: apt-get update && apt-get install -y make - uses: actions/checkout@v4
- name: "publish_password: Checkout repo" - uses: actions/setup-go@v5
uses: actions/checkout@v4
- name: "publish_password: Setup golang"
uses: actions/setup-go@v5
with: with:
go-version: "1.21" go-version: "1.21"
- name: "publish_password: build binary" - run: make build_password
run: make build_password - name: test secrets
- name: "publish_password: publish binary"
run: echo "${PASSWORD}" && bash ./scripts/publish_packages.sh "./bin" "password" run: echo "${PASSWORD}" && bash ./scripts/publish_packages.sh "./bin" "password"
env: env:
LOGIN: ${{ forge.ACTOR }} LOGIN: ${{ forge.ACTOR }}
@ -25,3 +21,6 @@ jobs:
SERVER_URL: ${{ forge.SERVER_URL }} SERVER_URL: ${{ forge.SERVER_URL }}
OWNER: ${{ forge.REPOSITORY_OWNER }} OWNER: ${{ forge.REPOSITORY_OWNER }}
VER: latest VER: latest
- run: make publish_password
env:
VER: latest

View file

@ -1,10 +1,11 @@
ARCH := amd64 arm64 ARCH := amd64 arm64
OS := linux windows darwin OS := linux windows darwin
NAME := password NAME := password
AUTH_HEADER := Authorization: token ${GITHUB_TOKEN}
.PHONY: all build_password .PHONY: all build_password publish_password
all: build_password all: build_password publish_password
build_password: build_password:
$(foreach GOOS, ${OS},\ $(foreach GOOS, ${OS},\
@ -12,6 +13,16 @@ build_password:
$(shell CGO_ENABLED=0 go build -v -o bin/${NAME} ./golang/cmd/passwordhash;cd bin/;[ "${GOOS}" = "windows" ] && mv ${NAME} ${NAME}.exe;tar czf ${NAME}_${GOOS}_${GOARCH}.tar.gz *;rm -f ${NAME} ${NAME}.exe) \ $(shell CGO_ENABLED=0 go build -v -o bin/${NAME} ./golang/cmd/passwordhash;cd bin/;[ "${GOOS}" = "windows" ] && mv ${NAME} ${NAME}.exe;tar czf ${NAME}_${GOOS}_${GOARCH}.tar.gz *;rm -f ${NAME} ${NAME}.exe) \
)) ))
publish_password:
$(shell curl -vvv -H "${AUTH_HEADER}" -X DELETE ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${NAME}/${VER})
$(foreach GOOS, ${OS}, \
$(foreach GOARCH, ${ARCH}, \
$(echo "token: ${{ secrets.PACKAGES }}") \
$(info Uploading ${NAME}_${GOOS}_${GOARCH}.tar.gz) \
$(shell curl -vvv --user "nicolas.boufidjeline:${{ secrets.PACKAGES }}" --upload-file bin/${NAME}_${GOOS}_${GOARCH}.tar.gz ${GITHUB_SERVER_URL}/api/packages/${GITHUB_REPOSITORY_OWNER}/generic/${NAME}/${VER}/${NAME}_${GOOS}_${GOARCH}.tar.gz) \
) \
)
clean: clean:
rm -rf bin rm -rf bin

View file

@ -14,10 +14,10 @@ echo "owner -> ${OWNER}"
ls "${PATH_DIR}" | while read tmp ls "${PATH_DIR}" | while read tmp
do do
curl --silent --user "${USER}:${TOKEN}" -X DELETE "${SERVER_URL}/api/packages/${OWNER}/generic/${NAME}/${VER}/${tmp}" && \ curl -vvv --user "${USER}:${TOKEN}" -X DELETE "${SERVER_URL}/api/packages/${OWNER}/generic/${NAME}/${VER}/${tmp}" && \
echo delete ok || \ echo delete ok || \
echo delete not necessarie echo delete not necessarie
curl --silent --user "${USER}:${TOKEN}" --upload-file "${PATH_DIR}/${tmp}" "${SERVER_URL}/api/packages/${OWNER}/generic/${NAME}/${VER}/${tmp}" && \ curl -vvv --user "${USER}:${TOKEN}" --upload-file "${PATH_DIR}/${tmp}" "${SERVER_URL}/api/packages/${OWNER}/generic/${NAME}/${VER}/${tmp}" && \
echo upload ok || \ echo upload ok || \
echo upload fail echo upload fail
done done