mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-08-03 20:06:00 -04:00
Migrate from depricated syntax to current (#60)
like https://codeberg.org/Codeberg-CI/examples/pulls/59 It addresses deprecation's upcoming in v2.8.0 now Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/60
This commit is contained in:
parent
0b4e537b2c
commit
4f535b51bf
@ -6,11 +6,11 @@ steps:
|
|||||||
image: golang
|
image: golang
|
||||||
environment:
|
environment:
|
||||||
# Needed if you want to cross-compile and package the binary in a container.
|
# Needed if you want to cross-compile and package the binary in a container.
|
||||||
- CGO_ENABLED=0
|
CGO_ENABLED: 0
|
||||||
# Select your target OS:
|
# Select your target OS:
|
||||||
- GOOS=linux
|
GOOS: linux
|
||||||
# Select your target architecture:
|
# Select your target architecture:
|
||||||
- GOARCH=amd64
|
GOARCH: amd64
|
||||||
commands:
|
commands:
|
||||||
- go get
|
- go get
|
||||||
- go build
|
- go build
|
||||||
|
@ -36,10 +36,13 @@ steps:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: bitnami/git
|
image: bitnami/git
|
||||||
# Must be set in Woodpecker configuration
|
|
||||||
secrets: [mail, codeberg_token]
|
|
||||||
environment:
|
environment:
|
||||||
- HUGO_OUTPUT=public
|
HUGO_OUTPUT: public
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
MAIL:
|
||||||
|
from_secret: mail
|
||||||
|
CODEBERG_TOKEN:
|
||||||
|
from_secret: codeberg_token
|
||||||
commands:
|
commands:
|
||||||
# Git configuration
|
# Git configuration
|
||||||
- git config --global user.email $MAIL
|
- git config --global user.email $MAIL
|
||||||
|
@ -25,7 +25,12 @@ steps:
|
|||||||
event: [push, pull_request]
|
event: [push, pull_request]
|
||||||
# Use the official jekyll build container
|
# Use the official jekyll build container
|
||||||
image: jekyll/jekyll
|
image: jekyll/jekyll
|
||||||
secrets: [cbtoken, cbmail]
|
environment:
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
CBMAIL:
|
||||||
|
from_secret: cbmail
|
||||||
|
CBTOKEN:
|
||||||
|
from_secret: cbtoken
|
||||||
commands:
|
commands:
|
||||||
# Avoid permission denied errors
|
# Avoid permission denied errors
|
||||||
- chmod -R a+w .
|
- chmod -R a+w .
|
||||||
|
@ -27,9 +27,13 @@ steps:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: bitnami/git
|
image: bitnami/git
|
||||||
secrets: [mail, codeberg_token]
|
|
||||||
environment:
|
environment:
|
||||||
- MDBOOK_OUTPUT=book
|
MDBOOK_OUTPUT: book
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
MAIL:
|
||||||
|
from_secret: mail
|
||||||
|
CODEBERG_TOKEN:
|
||||||
|
from_secret: codeberg_token
|
||||||
commands:
|
commands:
|
||||||
- git config --global user.email $MAIL
|
- git config --global user.email $MAIL
|
||||||
- git config --global user.name "Woodpecker CI"
|
- git config --global user.name "Woodpecker CI"
|
||||||
|
@ -27,7 +27,18 @@ steps:
|
|||||||
event: [push, pull_request]
|
event: [push, pull_request]
|
||||||
# Use the official jekyll build container
|
# Use the official jekyll build container
|
||||||
image: node
|
image: node
|
||||||
secrets: [cbtoken, cbmail, cbusername, sourcerepo, destrepo]
|
environment:
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
CBTOKEN:
|
||||||
|
from_secret: cbtoken
|
||||||
|
CBMAIL:
|
||||||
|
from_secret: cbmail
|
||||||
|
CBUSERNAME:
|
||||||
|
from_secret: cbusername
|
||||||
|
SOURCEREPO:
|
||||||
|
from_secret: sourcerepo
|
||||||
|
DESTREPO:
|
||||||
|
from_secret: destrepo
|
||||||
commands:
|
commands:
|
||||||
# Avoid permission denied errors
|
# Avoid permission denied errors
|
||||||
- chmod -R a+w .
|
- chmod -R a+w .
|
||||||
|
@ -26,7 +26,10 @@ steps:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: bitnami/git:2
|
image: bitnami/git:2
|
||||||
secrets: [cbtoken]
|
environment:
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
CBTOKEN:
|
||||||
|
from_secret: cbtoken
|
||||||
commands:
|
commands:
|
||||||
# config git to commit and push changes
|
# config git to commit and push changes
|
||||||
- git config --global --add safe.directory $CI_WORKSPACE/public
|
- git config --global --add safe.directory $CI_WORKSPACE/public
|
||||||
|
@ -13,7 +13,11 @@ steps:
|
|||||||
when:
|
when:
|
||||||
event: [push, pull_request]
|
event: [push, pull_request]
|
||||||
image: rocker/r-base
|
image: rocker/r-base
|
||||||
secrets: [github_pat]
|
environment:
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
# GitHub personal access token (PAT) used for authenticating API requests to avoid rate limiting
|
||||||
|
GITHUB_PAT:
|
||||||
|
from_secret: github_pat
|
||||||
commands:
|
commands:
|
||||||
- R -q -s -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
|
- R -q -s -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
|
||||||
- R -q -e 'options(Ncpus = 4)'
|
- R -q -e 'options(Ncpus = 4)'
|
||||||
|
@ -6,7 +6,7 @@ steps:
|
|||||||
check:
|
check:
|
||||||
image: eldesh/smlnj
|
image: eldesh/smlnj
|
||||||
environment:
|
environment:
|
||||||
- SML_FOLDER=src
|
SML_FOLDER: src
|
||||||
commands:
|
commands:
|
||||||
- find $SML_FOLDER -name *.sml | xargs sml
|
- find $SML_FOLDER -name *.sml | xargs sml
|
||||||
when:
|
when:
|
||||||
|
@ -25,8 +25,8 @@ steps:
|
|||||||
event: [push, pull_request]
|
event: [push, pull_request]
|
||||||
image: dxjoke/tectonic-docker
|
image: dxjoke/tectonic-docker
|
||||||
environment:
|
environment:
|
||||||
- TEX_FOLDER=docs
|
TEX_FOLDER: docs
|
||||||
- TEX_FILENAME=report
|
TEX_FILENAME: report
|
||||||
commands:
|
commands:
|
||||||
- tectonic -r 1 $TEX_FOLDER/$TEX_FILENAME.tex
|
- tectonic -r 1 $TEX_FOLDER/$TEX_FILENAME.tex
|
||||||
deploy:
|
deploy:
|
||||||
@ -35,12 +35,16 @@ steps:
|
|||||||
event: [push, pull_request]
|
event: [push, pull_request]
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
environment:
|
environment:
|
||||||
- TEX_FOLDER=docs
|
TEX_FOLDER: docs
|
||||||
- TEX_FILENAME=report
|
TEX_FILENAME: report
|
||||||
- OUT_REPO_NAME=pages
|
OUT_REPO_NAME: pages
|
||||||
- PDF_FOLDER=archive
|
PDF_FOLDER: archive
|
||||||
- PDF_FILENAME=project
|
PDF_FILENAME: project
|
||||||
secrets: [cbtoken, cbmail]
|
# secrets must be set in Woodpecker configuration
|
||||||
|
CBTOKEN:
|
||||||
|
from_secret: cbtoken
|
||||||
|
CBMAIL:
|
||||||
|
from_secret: cbmail
|
||||||
commands:
|
commands:
|
||||||
# Avoid permission denied errors
|
# Avoid permission denied errors
|
||||||
- chmod -R a+w .
|
- chmod -R a+w .
|
||||||
|
@ -25,19 +25,23 @@ steps:
|
|||||||
event: [push, pull_request]
|
event: [push, pull_request]
|
||||||
image: 123marvin123/typst
|
image: 123marvin123/typst
|
||||||
environment:
|
environment:
|
||||||
- TYPST_FOLDER=docs
|
TYPST_FOLDER: docs
|
||||||
- TYPST_FILENAME=report
|
TYPST_FILENAME: report
|
||||||
commands:
|
commands:
|
||||||
- typst $TYPST_FOLDER/$TYPST_FILENAME.typ
|
- typst $TYPST_FOLDER/$TYPST_FILENAME.typ
|
||||||
deploy:
|
deploy:
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
environment:
|
environment:
|
||||||
- TYPST_FOLDER=docs
|
TYPST_FOLDER: docs
|
||||||
- TYPST_FILENAME=report
|
TYPST_FILENAME: report
|
||||||
- OUT_REPO_NAME=pages
|
OUT_REPO_NAME: pages
|
||||||
- PDF_FOLDER=archive
|
PDF_FOLDER: archive
|
||||||
- PDF_FILENAME=project
|
PDF_FILENAME: project
|
||||||
secrets: [cbtoken, cbmail]
|
# secrets must be set in Woodpecker configuration
|
||||||
|
CBTOKEN:
|
||||||
|
from_secret: cbtoken
|
||||||
|
CBMAIL:
|
||||||
|
from_secret: cbmail
|
||||||
commands:
|
commands:
|
||||||
# Avoid permission denied errors
|
# Avoid permission denied errors
|
||||||
- chmod -R a+w .
|
- chmod -R a+w .
|
||||||
|
@ -32,13 +32,18 @@ steps:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
image: bitnami/git
|
image: bitnami/git
|
||||||
secrets: [mail, codeberg_token]
|
environment:
|
||||||
|
# secrets must be set in Woodpecker configuration
|
||||||
|
TOKEN:
|
||||||
|
from_secret: cbtoken
|
||||||
|
MAIL:
|
||||||
|
from_secret: cbmail
|
||||||
commands:
|
commands:
|
||||||
# Configure Git
|
# Configure Git
|
||||||
- git config --global user.email $MAIL
|
- git config --global user.email $MAIL
|
||||||
- git config --global user.name "Woodpecker CI"
|
- git config --global user.name "Woodpecker CI"
|
||||||
# Clone the output branch
|
# Clone the output branch
|
||||||
- git clone --branch pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
- git clone --branch pages https://$TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
||||||
# Enter the output branch
|
# Enter the output branch
|
||||||
- cd $CI_REPO_NAME
|
- cd $CI_REPO_NAME
|
||||||
# Remove old files
|
# Remove old files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user