Movatterモバイル変換


[0]ホーム

URL:


LoginSignup
8

Go to list of users who liked

0

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GitHub ActionsとRcloneでGitHub管理されているファイルをGoogle Driveに同期する

Last updated atPosted at 2022-09-20

組織の中で、GitHubアカウントを持っていない人に対してGitHub管理されているファイルを共有したいなんてことがあるかもしれません。

今回は、GitHub ActionsとRcloneを利用して、GitHub管理されているファイルをGoogle Driveに同期したので手順をまとめます。

Rcloneについては以前に記事を書きましたのでこちらを御覧ください。
RcloneでmacOSとGoogle Driveのファイルを同期してみた - Qiita

1. Rcloneの設定ファイルを作成する

以前に書いた記事の初期設定としてrclone config を実行しました。

初期設定が完了すると設定ファイル(~/.config/rclone/rclone.conf)が生成されるので内容を控えておきます。

2. GitHub ActionsのSecretsに登録する

以下の内容をGithub ActionsのSecretsに登録します。

名前:RCLONE_CONF
内容: 手順1で控えた設定ファイルの内容

スクリーンショット 2022-09-20 21.42.12.png

3. ワークフローを作成する

今回はマーケットプレイスに公開されているアクションを利用しました。

.github/workflows/sync-github-and-gdrive.yml
name:Sync GitHub and Google Driveon:pushjobs:rclone:runs-on:ubuntu-lateststeps:-uses:actions/checkout@master-name:rcloneuses:wei/rclone@v1env:RCLONE_CONF:${{ secrets.RCLONE_CONF }}with:args:sync <source>:<source_path> <dest>:<dest_path># 例# args: sync ./rclone_test google_drive:rclone_test

wei/rclone: Wraps the rclone CLI to be used in Github Actions

4. リポジトリにpushする

GitHub Actionsが実行され、Google Driveにファイルが同期されれば成功です。

以上です。

8

Go to list of users who liked

0
1

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8

Go to list of users who liked

0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?


[8]ページ先頭

©2009-2025 Movatter.jp