4 Commits

Author SHA1 Message Date
0768d5fb3e Added secrets to environment variables
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:40:15 +13:00
d9e71bec29 Update apk package list
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:33:54 +13:00
85213537ce Check curl is available
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:33:26 +13:00
7f616fb5eb Actually exclude the main pipeline
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 16:26:29 +13:00

View File

@@ -59,6 +59,8 @@ local gen_pipeline(distro) =
name: 'dockersock',
temp: {},
},],
trigger:
{ event: {exclude: ['tag'],},},
when:
{ event: {exclude: ['tag']},
},
@@ -74,9 +76,16 @@ local gen_release() =
'mkdir ${DRONE_REPO_NAME}',
'rsync -a . ${DRONE_REPO_NAME} --exclude ${DRONE_REPO_NAME}',
'cd ${DRONE_REPO_NAME}',
'apk update && apk add --no-cache curl',
'tar -czf ../${DRONE_REPO_NAME}.${DRONE_TAG}.tar.gz ./*', // Create an archive of the role
'curl --user ${GITEA_USER}:${GITEA_TOKEN} --upload-file ../${DRONE_REPO_NAME}.${DRONE_TAG}.tar.gz https://${GITEA_URL}/api/packages/${GITEA_REPOUSER}/generic/ansible-role-common/${DRONE_TAG}/${DRONE_REPO_NAME}.${DRONE_TAG}.tar.gz',
],
environment:
{ GITEA_USER: { from_secret: 'GITEA_USER' },
GITEA_TOKEN: { from_secret: 'GITEA_TOKEN' },
GITEA_REPOUSER: { from_secret: 'GITEA_REPOUSER'},
GITEA_URL: { from_secret: 'GITEA_URL' },
},
when:
{ event: {include: ['tag']},
},