From 223f1df9d367b8dbb15e4c8e4d241492f59f350d Mon Sep 17 00:00:00 2001 From: Daniel Leite Date: Sat, 26 Nov 2022 15:10:07 +0000 Subject: [PATCH 1/3] centos7 ci container --- .github/workflows/build_ci.yaml | 20 ++++++++++++++++++++ ci/publish.ps1 | 1 + ci/publish.sh | 4 ++++ ci/rome-ci-x86-64-centos7/Dockerfile | 8 ++++++++ 4 files changed, 33 insertions(+) create mode 100644 .github/workflows/build_ci.yaml create mode 100644 ci/publish.ps1 create mode 100755 ci/publish.sh create mode 100644 ci/rome-ci-x86-64-centos7/Dockerfile diff --git a/.github/workflows/build_ci.yaml b/.github/workflows/build_ci.yaml new file mode 100644 index 00000000000..043a2570aaf --- /dev/null +++ b/.github/workflows/build_ci.yaml @@ -0,0 +1,20 @@ +name: build_ci +on: + push: + branches: + - main + paths: + - 'ci/**' + +jobs: + publish-to-docker: + name: Publish to Docker + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Publish to Docker Hub + run: ./ci/publish.sh \ No newline at end of file diff --git a/ci/publish.ps1 b/ci/publish.ps1 new file mode 100644 index 00000000000..5a053b3d764 --- /dev/null +++ b/ci/publish.ps1 @@ -0,0 +1 @@ +. ./publish.sh \ No newline at end of file diff --git a/ci/publish.sh b/ci/publish.sh new file mode 100755 index 00000000000..0847feff57b --- /dev/null +++ b/ci/publish.sh @@ -0,0 +1,4 @@ +cd rome-ci-x86-64-centos7 +docker build . --tag rome-ci-x86-64-centos7:latest +docker push rome-ci-x86-64-centos7:latest +cd .. \ No newline at end of file diff --git a/ci/rome-ci-x86-64-centos7/Dockerfile b/ci/rome-ci-x86-64-centos7/Dockerfile new file mode 100644 index 00000000000..f010b43bbf4 --- /dev/null +++ b/ci/rome-ci-x86-64-centos7/Dockerfile @@ -0,0 +1,8 @@ +FROM centos:centos7 +SHELL ["/bin/bash", "--login", "-c"] +RUN yum update -y +RUN yum install gcc gcc-c++ make openssl-devel git -y +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash +RUN nvm install 14 +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN cargo install cargo-audit \ No newline at end of file From 6fe710984db3be88530ba01ea61a4952fd4d39ba Mon Sep 17 00:00:00 2001 From: Daniel Leite Date: Wed, 30 Nov 2022 17:21:01 +0000 Subject: [PATCH 2/3] publishing container to ghcr --- .github/workflows/build_ci.yaml | 13 +++++++------ ci/publish.sh | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_ci.yaml b/.github/workflows/build_ci.yaml index 043a2570aaf..18c0edbdb63 100644 --- a/.github/workflows/build_ci.yaml +++ b/.github/workflows/build_ci.yaml @@ -7,14 +7,15 @@ on: - 'ci/**' jobs: - publish-to-docker: - name: Publish to Docker + publish-container: + name: Publish Container runs-on: ubuntu-latest steps: - - name: Login to Docker Hub + - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Publish to Docker Hub + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Publish Container run: ./ci/publish.sh \ No newline at end of file diff --git a/ci/publish.sh b/ci/publish.sh index 0847feff57b..1490ac0083c 100755 --- a/ci/publish.sh +++ b/ci/publish.sh @@ -1,4 +1,4 @@ cd rome-ci-x86-64-centos7 -docker build . --tag rome-ci-x86-64-centos7:latest -docker push rome-ci-x86-64-centos7:latest +docker build . --tag ghcr.io/rome/rome-ci-x86-64-centos7:latest +docker push ghcr.io/rome/rome-ci-x86-64-centos7:latest cd .. \ No newline at end of file From ea2bc678e365e0b4b1b923d5ac68de86d6d4afe5 Mon Sep 17 00:00:00 2001 From: Daniel Leite Date: Wed, 30 Nov 2022 18:20:29 +0000 Subject: [PATCH 3/3] renaming and workflow_dispatch --- .github/workflows/{build_ci.yaml => publish_container_ci.yaml} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{build_ci.yaml => publish_container_ci.yaml} (90%) diff --git a/.github/workflows/build_ci.yaml b/.github/workflows/publish_container_ci.yaml similarity index 90% rename from .github/workflows/build_ci.yaml rename to .github/workflows/publish_container_ci.yaml index 18c0edbdb63..c2f6c86ef56 100644 --- a/.github/workflows/build_ci.yaml +++ b/.github/workflows/publish_container_ci.yaml @@ -1,5 +1,6 @@ -name: build_ci +name: publish_container_ci on: + workflow_dispatch: push: branches: - main