package git
import (
"strings"
"alpha.dagger.io/git"
"alpha.dagger.io/alpine"
"alpha.dagger.io/os"
"alpha.dagger.io/dagger/op"
)
repo: git.#Repository & {
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "master"
#up: [
op.#FetchGit & {
keepGitDir: true
},
]
}
branch: git.#CurrentBranch & {
repository: repo
tagsList: git.#Tags & {
TestRepository: os.#Container & {
image: alpine.#Image & {
package: bash: "=5.1.0-r0"
package: git: true
mount: "/repo1": from: repo
dir: "/repo1"
command: """
[ -d .git ]
"""
TestCurrentBranch: os.#Container & {
env: BRANCH_NAME: branch.name
[ $BRANCH_NAME = "master" ]
TestCurrentTags: os.#Container & {
env: TAGS: strings.Join([ for k, v in tagsList.tags {"\(k)=\(v)"}], "\n")
[ $TAGS = "0=master" ]