From 73927b2633336216f77ebfcff841431bedc5a223 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:03:59 -0700 Subject: [PATCH 01/12] Attempt no use of dockerfile --- .github/workflows/docker.yml | 38 ------------------------------------ Dockerfile | 15 -------------- lib/action.rb => action.rb | 0 action.yml | 4 +++- lib/entrypoint.sh | 5 ----- setup.sh | 4 ++++ 6 files changed, 7 insertions(+), 59 deletions(-) delete mode 100644 .github/workflows/docker.yml delete mode 100644 Dockerfile rename lib/action.rb => action.rb (100%) delete mode 100755 lib/entrypoint.sh create mode 100755 setup.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index dcc961e..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Docker Image -on: - schedule: - - cron: "0 0 1 * *" # Once a month - push: - tags: "*" - branches: - - main - pull_request: - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-and-publish: - runs-on: ubuntu-latest - if: github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository ) - steps: - - uses: actions/checkout@v2 - - name: Log into the Container registry - uses: docker/login-action@v1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata for the Docker image - id: meta - uses: docker/metadata-action@v3 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push the Docker image - uses: docker/build-push-action@v2 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 85126d9..0000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM dependabot/dependabot-core -USER root - -LABEL "repository"="https://github.com/marcoroth/dependabot-bump-together-action" -LABEL "version"="0.3.0" - -RUN echo 'gem: --no-document' >> ~/.gemrc - -RUN gem install bundler -RUN gem install dependabot-omnibus - -WORKDIR /action -COPY lib /action/lib - -ENTRYPOINT ["/action/lib/entrypoint.sh"] diff --git a/lib/action.rb b/action.rb similarity index 100% rename from lib/action.rb rename to action.rb diff --git a/action.yml b/action.yml index e640c19..2b09800 100644 --- a/action.yml +++ b/action.yml @@ -29,4 +29,6 @@ branding: color: 'blue' runs: using: 'docker' - image: 'docker://ghcr.io/marcoroth/dependabot-bump-together-action:main' + image: 'docker://dependabot/dependabot-core' + pre-entrypoint: 'setup.sh' + entrypoint: ['ruby', './action.rb'] diff --git a/lib/entrypoint.sh b/lib/entrypoint.sh deleted file mode 100755 index 8d331bb..0000000 --- a/lib/entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -e - -ruby /action/lib/action.rb diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..58c9656 --- /dev/null +++ b/setup.sh @@ -0,0 +1,4 @@ +#!/bin/sh +echo 'gem: --no-document' >> ~/.gemrc +gem install bundler +gem install dependabot-omnibus From 033c0d36d6e7c00f58fb09293c20ed4382d20634 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:06:18 -0700 Subject: [PATCH 02/12] Attempt fix entrypoint --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2b09800..28ce082 100644 --- a/action.yml +++ b/action.yml @@ -31,4 +31,4 @@ runs: using: 'docker' image: 'docker://dependabot/dependabot-core' pre-entrypoint: 'setup.sh' - entrypoint: ['ruby', './action.rb'] + entrypoint: 'ruby ./action.rb' From 25afdc4bf15e100979eb0cde69f74d60b3b59c45 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:15:57 -0700 Subject: [PATCH 03/12] Attempt use composite action --- action.yml | 14 ++++++++++---- setup.sh | 4 ---- 2 files changed, 10 insertions(+), 8 deletions(-) delete mode 100755 setup.sh diff --git a/action.yml b/action.yml index 28ce082..7d3f910 100644 --- a/action.yml +++ b/action.yml @@ -28,7 +28,13 @@ branding: icon: 'arrow-up-circle' color: 'blue' runs: - using: 'docker' - image: 'docker://dependabot/dependabot-core' - pre-entrypoint: 'setup.sh' - entrypoint: 'ruby ./action.rb' + using: "composite" + steps: + - uses: ruby/setup-ruby@v1 + - name: Install bundler and dependabot + run: | + gem install bundler + gem install dependabot-omnibus + - name: Check dependencies + run: ${{ github.action_path }}/action.rb + shell: ruy diff --git a/setup.sh b/setup.sh deleted file mode 100755 index 58c9656..0000000 --- a/setup.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -echo 'gem: --no-document' >> ~/.gemrc -gem install bundler -gem install dependabot-omnibus From 2651d092758697bdbe141785a1856dcda8e7227f Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:17:29 -0700 Subject: [PATCH 04/12] Fix shell --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7d3f910..ddf5942 100644 --- a/action.yml +++ b/action.yml @@ -32,9 +32,10 @@ runs: steps: - uses: ruby/setup-ruby@v1 - name: Install bundler and dependabot + shell: bash run: | gem install bundler gem install dependabot-omnibus - name: Check dependencies + shell: ruby run: ${{ github.action_path }}/action.rb - shell: ruy From 3c5a7eb508e8ae94dbae7f2da9abcd0c263add05 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:18:37 -0700 Subject: [PATCH 05/12] Fix ruby version --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index ddf5942..ca15cb1 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,8 @@ runs: using: "composite" steps: - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6 - name: Install bundler and dependabot shell: bash run: | From 1aff7f4ce43c896a18aa70078271ff2cacea0baa Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:19:57 -0700 Subject: [PATCH 06/12] Use latest ruby --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ca15cb1..fbc34e5 100644 --- a/action.yml +++ b/action.yml @@ -32,7 +32,7 @@ runs: steps: - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.1 - name: Install bundler and dependabot shell: bash run: | From cbd4ddae9353488730db7f1028584df90da684a8 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:21:47 -0700 Subject: [PATCH 07/12] Fix ruby script --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index fbc34e5..8dfdb4d 100644 --- a/action.yml +++ b/action.yml @@ -39,5 +39,5 @@ runs: gem install bundler gem install dependabot-omnibus - name: Check dependencies - shell: ruby - run: ${{ github.action_path }}/action.rb + shell: bash + run: ruby ${{ github.action_path }}/action.rb From 0f977f61eaa8974ec550eebfb8adf27ea024ea58 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:30:45 -0700 Subject: [PATCH 08/12] Fix environment variables --- action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/action.yml b/action.yml index 8dfdb4d..7ad79c9 100644 --- a/action.yml +++ b/action.yml @@ -41,3 +41,12 @@ runs: - name: Check dependencies shell: bash run: ruby ${{ github.action_path }}/action.rb + env: + https://github.com/actions/runner/issues/665#issuecomment-676581170 + GITHUB_REPOSITORY: ${{ github.repository }} + INPUT_USERNAME: ${{ inputs.username }} + INPUT_DIRECTORY: ${{ inputs.directory }} + INPUT_BRANCH: ${{ inputs.branch }} + INPUT_DEPENDENCIES: ${{ inputs.dependencies }} + INPUT_PACKAGE_MANAGERS: ${{ inputs.package_managers }} + INPUT_TOKEN: ${{ inputs.token }} From f64af18a068b5fd7e75878ba0afce3b871ed4cca Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:33:24 -0700 Subject: [PATCH 09/12] Attempt fix --- action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 7ad79c9..96d1349 100644 --- a/action.yml +++ b/action.yml @@ -40,10 +40,9 @@ runs: gem install dependabot-omnibus - name: Check dependencies shell: bash - run: ruby ${{ github.action_path }}/action.rb + run: GITHUB_REPOSITORY=${{ github.repository }} ruby ${{ github.action_path }}/action.rb env: https://github.com/actions/runner/issues/665#issuecomment-676581170 - GITHUB_REPOSITORY: ${{ github.repository }} INPUT_USERNAME: ${{ inputs.username }} INPUT_DIRECTORY: ${{ inputs.directory }} INPUT_BRANCH: ${{ inputs.branch }} From 69aa0d043d251fff28a9f24ecee8fb7e63ad9249 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:35:26 -0700 Subject: [PATCH 10/12] Fix comment syntax --- action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 96d1349..265e02b 100644 --- a/action.yml +++ b/action.yml @@ -40,9 +40,10 @@ runs: gem install dependabot-omnibus - name: Check dependencies shell: bash - run: GITHUB_REPOSITORY=${{ github.repository }} ruby ${{ github.action_path }}/action.rb + run: ${{ github.repository }}ruby ${{ github.action_path }}/action.rb env: - https://github.com/actions/runner/issues/665#issuecomment-676581170 + # https://github.com/actions/runner/issues/665#issuecomment-676581170 + GITHUB_REPOSITORY: ${{ github.repository }} INPUT_USERNAME: ${{ inputs.username }} INPUT_DIRECTORY: ${{ inputs.directory }} INPUT_BRANCH: ${{ inputs.branch }} From 278152259ea39812fa32c8a4db6838c73d75b825 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:36:44 -0700 Subject: [PATCH 11/12] ugh fix sloppy typo --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 265e02b..2739cf1 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,7 @@ runs: gem install dependabot-omnibus - name: Check dependencies shell: bash - run: ${{ github.repository }}ruby ${{ github.action_path }}/action.rb + run: ruby ${{ github.action_path }}/action.rb env: # https://github.com/actions/runner/issues/665#issuecomment-676581170 GITHUB_REPOSITORY: ${{ github.repository }} From 5047746266811b5990d6f6bd45660c2f9c787598 Mon Sep 17 00:00:00 2001 From: banesullivan Date: Sat, 22 Jan 2022 19:41:57 -0700 Subject: [PATCH 12/12] Add Python --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 2739cf1..3358728 100644 --- a/action.yml +++ b/action.yml @@ -30,6 +30,9 @@ branding: runs: using: "composite" steps: + - uses: actions/setup-python@v2 + with: + python-version: "3.8" - uses: ruby/setup-ruby@v1 with: ruby-version: 3.1