From 818d4919b4f990010fa687063d4b2dfa8f429f76 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Mon, 10 Oct 2022 11:03:24 +0700 Subject: [PATCH] update bootstrap --- .github/workflows/bootstrap-anda.yml | 55 ++++++++++++++++++++ .github/workflows/bootstrap-subatomic.yml | 61 +++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 .github/workflows/bootstrap-anda.yml create mode 100644 .github/workflows/bootstrap-subatomic.yml diff --git a/.github/workflows/bootstrap-anda.yml b/.github/workflows/bootstrap-anda.yml new file mode 100644 index 0000000000..585c7abf57 --- /dev/null +++ b/.github/workflows/bootstrap-anda.yml @@ -0,0 +1,55 @@ +name: Bootstrap anda + + +on: + workflow_dispatch: + +jobs: + bootstrap: + strategy: + matrix: + version: ["ad37"] + arch: ["x86_64", "aarch64"] + fail-fast: true + runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} + container: + image: fedora:37 + options: --cap-add=SYS_ADMIN --privileged + steps: + - uses: actions/checkout@v3 + with: + repository: FyraLabs/anda + + # - name: Run shell commands + # run: | + # git config --global url.https://github.com/.insteadOf git://github.com/ + # git clone https://github.com/FyraLabs/anda.git + - uses: actions/setup-go@v3 + with: + go-version: "^1.19" + + - name: Install repositories + run: | + sudo dnf install -y dnf-plugins-core + sudo dnf config-manager --add-repo https://github.com/andaman-common-pkgs/subatomic-repos/raw/main/ad37.repo + - run: sudo dnf install -y mock createrepo_c rpm-build anda-mock-configs gcc curl wget git-core openssl-devel + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Install Anda + uses: actions-rs/cargo@v1 + with: + command: install + args: anda + + - name: Install Subatomic + run: go install github.com/FyraLabs/subatomic/subatomic-cli@latest + + - name: Build + run: anda build -c anda-37-${{ matrix.arch }} anda -p rpm + + - run: | + subatomic-cli upload --prune \ + --server https://subatomic.fyralabs.com \ + --token ${{ secrets.SUBATOMIC_TOKEN }} \ + ${{ matrix.version }} anda-build/rpm/rpms/* \ No newline at end of file diff --git a/.github/workflows/bootstrap-subatomic.yml b/.github/workflows/bootstrap-subatomic.yml new file mode 100644 index 0000000000..7770b2a318 --- /dev/null +++ b/.github/workflows/bootstrap-subatomic.yml @@ -0,0 +1,61 @@ +name: Bootstrap subatomic + + +on: + workflow_dispatch: + +jobs: + bootstrap: + strategy: + matrix: + version: ["ad37"] + arch: ["x86_64", "aarch64"] + fail-fast: true + runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} + container: + image: fedora:37 + options: --cap-add=SYS_ADMIN --privileged + steps: + + # - name: Run shell commands + # run: | + # git config --global url.https://github.com/.insteadOf git://github.com/ + # git clone https://github.com/FyraLabs/anda.git + + + - uses: actions/setup-go@v3 + with: + go-version: "^1.19" + + - name: Install repositories + run: | + sudo dnf install -y dnf-plugins-core + sudo dnf config-manager --add-repo https://github.com/andaman-common-pkgs/subatomic-repos/raw/main/ad37.repo + - run: sudo dnf install -y mock createrepo_c rpm-build anda-mock-configs gcc curl wget git-core openssl-devel + - uses: actions/checkout@v3 + with: + repository: FyraLabs/subatomic + set-safe-directory: true + fetch-depth: 1 + - name: Set up git repository + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Install Anda + uses: actions-rs/cargo@v1 + with: + command: install + args: anda + + - name: Install Subatomic + run: go install github.com/FyraLabs/subatomic/subatomic-cli@latest + + - name: Build + run: anda build -c anda-37-${{ matrix.arch }} subatomic -p rpm + - run: | + subatomic-cli upload --prune \ + --server https://subatomic.fyralabs.com \ + --token ${{ secrets.SUBATOMIC_TOKEN }} \ + ${{ matrix.version }} anda-build/rpm/rpms/* \ No newline at end of file