]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
fix workflow of Github Actions to clone requested repository
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 9 Feb 2020 02:53:39 +0000 (11:53 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Sun, 9 Feb 2020 03:10:51 +0000 (12:10 +0900)
Even if any pull request is triggered, in 'build_in_ubuntu_on_lxd' job
of 'Build test' workflow, upstream repository is cloned and requested
git hash is checked out. However this fails because the hash is in
requested repository.

This commit fixes the workflow so that requested repository is cloned.

Fixes: 8cb6715aab65 ('Add support workflow of Github Actions')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
.github/workflows/build.yml

index ac2942c30ee8aac1ee63cd18b0b641e83f13dfac..16a78afbf6c8fc4df3fddb084371477f753a0956 100644 (file)
@@ -54,14 +54,12 @@ jobs:
         sudo lxc exec builder -- su ubuntu -c 'sudo apt-get install -y git build-essential'
         sudo lxc exec builder -- su ubuntu -c 'sudo apt-get install -y meson ninja-build libglib2.0-dev libudev-dev gobject-introspection libgirepository1.0-dev'
         sudo lxc exec builder -- su ubuntu -c 'sudo apt-get install -y gtk-doc-tools python3-gi'
-    - name: Clone repository.
-      run: |
-        sudo lxc exec builder -- su ubuntu -c "cd; git clone http://github.com/${GITHUB_REPOSITORY} local-repository"
-    - name: Generate archive.
-      run: |
-        sudo lxc exec builder -- su ubuntu -c "cd; cd local-repository; git archive --format=tar --prefix=dist/ ${GITHUB_SHA} | xz > ../archive.tar.xz"
-    - name: Expand archive.
+    - name: Checkout repository.
+      uses: actions/checkout@v2
+    - name: Generate archive and expand it inner the container.
       run: |
+        git archive --format=tar --prefix=dist/ HEAD | xz > archive.tar.xz
+        sudo lxc file push archive.tar.xz builder/home/ubuntu/
         sudo lxc exec builder -- su ubuntu -c 'cd; tar xf archive.tar.xz'
     - name: Initialization for build
       run: |