diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..febd9ad --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,46 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/configuration-reference/#executor-job + docker: + - image: cimg/android:2022.09 + # Add steps to the job + # See: https://circleci.com/docs/configuration-reference/#steps + steps: + - checkout + - add_ssh_keys: + fingerprints: + - "41:e0:a7:e9:e0:b9:4e:cc:1e:1a:0d:b9:49:6c:16:17" + - run: + name: "ファイル差分あるとき画像生成する" + command: | + md5sum foo.txt> new_foo.md5 + if [ "$(diff foo.md5 new_foo.md5)" ] + then + echo "log : diff exist" + else + echo "log : no diff exist" + exit + fi + echo "log : continue" + sudo apt-get install -y graphviz + dot -T png foo.txt -o foo.png + mv new_foo.md5 foo.md5 + git config --global user.name 'foo-user' + git config --global user.email 'foo@gyamoto.dev' + git add foo.* + git commit -m 'update foo.*' + git push origin $CIRCLE_BRANCH + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello diff --git a/foo.md5 b/foo.md5 new file mode 100644 index 0000000..c3f17c6 --- /dev/null +++ b/foo.md5 @@ -0,0 +1 @@ +3b0d260183a9f52ebb10907d355ccb37 foo.txt diff --git a/foo.png b/foo.png new file mode 100644 index 0000000..227708a Binary files /dev/null and b/foo.png differ diff --git a/foo.sh b/foo.sh new file mode 100755 index 0000000..ee4044f --- /dev/null +++ b/foo.sh @@ -0,0 +1,17 @@ +md5 foo.txt> new_foo.md5 + +if [ "$(diff foo.md5 new_foo.md5)" ] +then + echo "diff exist" +else + echo "no diff exist" + exit +fi + +echo "continue" +dot -T png foo.txt -o foo.png +mv new_foo.md5 foo.md5 + +git config --global user.name 'foo-user' +git add foo.* +git commit -m 'update foo.* [ci skip]' diff --git a/foo.txt b/foo.txt new file mode 100644 index 0000000..2a8d7bc --- /dev/null +++ b/foo.txt @@ -0,0 +1,6 @@ +strict graph { + a -- b + a -- b + b -- c + b -- a [color=blue] +}

AltStyle によって変換されたページ (->オリジナル) /