--- stages: - 'sync' - 'build' 'Sync Haskell': stage: 'sync' script: # Config - 'git config --global user.name "Nest CI"' - 'git config --global user.email nest@james.tl' - 'eval $(ssh-agent -s)' - 'chmod 600 "$SSH_PRIVATE_KEY" && ssh-add "$SSH_PRIVATE_KEY"' - 'mkdir -p ~/.ssh && chmod 700 ~/.ssh' - 'cat "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts' # Sync - 'git pull --no-edit https://github.com/gentoo-haskell/gentoo-haskell.git' # Push # - 'git add .' # - 'git commit -m "$(date -I) snapshot"' - 'git remote set-url origin git@gitlab.james.tl:nest/gentoo/haskell.git' - 'git push -o ci.skip origin "HEAD:${CI_COMMIT_BRANCH}"' 'Build Image': stage: 'build' image: '${CI_REGISTRY}/nest/tools/buildah:${CI_HOST_PLATFORM}' script: - 'buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"' - 'buildah bud --pull -t "$CI_REGISTRY_IMAGE" -f .Containerfile .' - 'buildah push "$CI_REGISTRY_IMAGE"'