From 658bdceb2e8ddae2016daba1ab6b521aa26364ae Mon Sep 17 00:00:00 2001 From: TiKevin83 <38826675+TiKevin83@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:54:40 -0400 Subject: [PATCH] Port build CircleCI to GitHub Actions (#227) * Port build CircleCI to GitHub Actions * Update ubuntu image used --- .circleci/config.yml | 50 ------------------------------------- .github/workflows/build.yml | 23 +++++++++++++++++ 2 files changed, 23 insertions(+), 50 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7783a18..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: 2 - -defaults: &defaults - machine: - image: ubuntu-2004:202201-02 - working_directory: ~/project - -aliases: - - &build-docker - name: Build Docker Image - no_output_timeout: 30m - command: | - docker build -t react-native-community/react-native . - docker run --rm --name rn-env react-native-community/react-native bin/sh -c "npx envinfo" - -jobs: - deploy: - <<: *defaults - steps: - - checkout - - run: *build-docker - - run: - name: Deploy docker - command: | - source ~/.bashrc - nvm i node - node publish_docker.js - - build: - <<: *defaults - steps: - - checkout - - run: *build-docker - - run: - name: Checkout React Native - command: git clone https://github.com/facebook/react-native.git - - run: - name: Build React Native - no_output_timeout: 30m - command: docker run --rm --ulimit nofile=10240 -v "$(pwd)/scripts/":/scripts -v "$(pwd)/react-native/":/react-native -w /react-native react-native-community/react-native /bin/sh -c "/scripts/test-react-native-setup.sh" - -workflows: - version: 2 - main: - jobs: - - deploy: - filters: - branches: - only: main - - build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b488fd2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build Docker Image + run: | + docker build -t react-native-community/react-native . + docker run --rm --name rn-env react-native-community/react-native /bin/sh -c "npx envinfo" + - name: Checkout React Native + run: git clone https://github.com/facebook/react-native.git + - name: Build React Native + run: | + docker run --rm --ulimit nofile=10240 -v "$(pwd)/scripts/":/scripts -v "$(pwd)/react-native/":/react-native -w /react-native react-native-community/react-native /bin/sh -c "/scripts/test-react-native-setup.sh"