From 9b6e80d5dc8dbfee838410254602b4567dfac43f Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Wed, 18 Jan 2023 10:09:38 -0300 Subject: [PATCH 1/8] feat: add ruby workflow --- .github/workflows/ruby_app_pull_requests.yml | 73 ++++++++++++ .github/workflows/ruby_app_push_main.yml | 39 +++++++ .github/workflows/ruby_app_release.yml | 112 +++++++++++++++++++ README.md | 1 + 4 files changed, 225 insertions(+) create mode 100644 .github/workflows/ruby_app_pull_requests.yml create mode 100644 .github/workflows/ruby_app_push_main.yml create mode 100644 .github/workflows/ruby_app_release.yml diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml new file mode 100644 index 0000000..bae44f4 --- /dev/null +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -0,0 +1,73 @@ +name: Pull Request + +on: + workflow_call: + inputs: + GH_CI_USER: + description: 'User for GitHub auth' + required: true + type: string + secrets: + GH_CI_PAT: + description: 'Token password for GitHub auth' + required: true + +jobs: + commitlint: + # + # ensures commit messages follow conventional commits + # + runs-on: ubuntu-latest + steps: + # checkout the commits to lint. + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + # setup node, needed to lint commits. + - uses: actions/setup-node@v1 + with: + node-version: 18 + # Install needed libraries to lint commits. + - run: npm install --save-dev @commitlint/{config-conventional,cli} + # Lint the commits. + - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} + + test: + # + # Disable due to performance. + # Ruby on Rails tests needs to have a redis/postgres/elasticsearch instance to test the framework. + # + + docker-build: + # + # ensures the docker image will build without pushing to the registry + # uses the git sha for the most recent commit for the version + # + runs-on: ubuntu-latest + steps: + # Checkout code to build. + - name: Checkout repo + uses: actions/checkout@v3 + # Setup docker build arguments. + - name: Docker release meta + id: release + uses: docker/metadata-action@v4 + with: + images: | + ${{ github.repository }} + tags: | + type=sha + # Setup Docker builder to do build. + # We need this? + - name: Setup Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + # Build the app. + - name: Build + uses: docker/build-push-action@v3 + with: + push: false + context: . + file: Dockerfile + platforms: linux/amd64 + tags: ${{ steps.release.outputs.tags }} diff --git a/.github/workflows/ruby_app_push_main.yml b/.github/workflows/ruby_app_push_main.yml new file mode 100644 index 0000000..84d40d3 --- /dev/null +++ b/.github/workflows/ruby_app_push_main.yml @@ -0,0 +1,39 @@ +name: Create Github Release + +on: + workflow_call: + secrets: + GH_CI_PAT: + description: 'Token password for GitHub auth' + required: true + +jobs: + release: + # + # Create a GitHub Release based on conventional commits. + # + name: 'Release to GitHub' + runs-on: ubuntu-latest + steps: + # Checkout code to release. + - name: Checkout repo + uses: actions/checkout@v3 + # Setup Node needed to create release. + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 18 + # Add plugin to make the changelog for the release. + - name: Add plugin for conventional commits + run: npm install conventional-changelog-conventionalcommits + working-directory: ./.github/workflows + # Create the release. + - name: Release to GitHub + working-directory: ./.github/workflows + env: + GITHUB_TOKEN: ${{ secrets.GH_CI_PAT }} + GIT_AUTHOR_NAME: release-bot + GIT_AUTHOR_EMAIL: release@test.com + GIT_COMMITTER_NAME: asyncapi-bot + GIT_COMMITTER_EMAIL: info@asyncapi.io + run: npx semantic-release diff --git a/.github/workflows/ruby_app_release.yml b/.github/workflows/ruby_app_release.yml new file mode 100644 index 0000000..8261543 --- /dev/null +++ b/.github/workflows/ruby_app_release.yml @@ -0,0 +1,112 @@ +name: Release Docker Version + +on: + workflow_call: + inputs: + GH_CI_USER: + description: 'User for GitHub auth' + required: true + type: string + secrets: + GH_CI_PAT: + description: 'Token password for GitHub auth' + required: true + + # Registry arguments. + # Must supply set of arguments for at least 1 registry. + + # Artifact Registry arguments + ARTIFACT_REGISTRY: + description: 'Artifact Registry address to which to publish (leave blank to not publish)' + required: false + ARTIFACT_REGISTRY_JSON_KEY: + description: 'Key for publishing to Artifact Registry' + required: false + # Container Registry arguements + CONTAINER_REGISTRY: + description: 'Container Registry address to which to publish (leave blank to not publish)' + required: false + CONTAINER_REGISTRY_JSON_KEY: + description: 'Key for publishing to Container Registry' + required: false + +jobs: + push: + # + # Build the Docker image artifact and deliver it. + # + runs-on: ubuntu-latest + steps: + # Checkout code needed to build docker image. + - uses: actions/checkout@v3 + # Parse GitHub repository name for use in constructing docker image names. + - name: Parse Repo Name + id: parse_repo_name + run: | + echo "repo_name=$( echo '${{ github.repository }}' | awk -F '/' '{print $2}' )" >> $GITHUB_OUTPUT + # Make the docker fields for Artifact Registry if we're pushing to it. + - name: Construct Artifact Registry fields + env: + ARTIFACT_REGISTRY: ${{ secrets.ARTIFACT_REGISTRY }} + if: ${{ env.ARTIFACT_REGISTRY }} + run: | + echo "ARTIFACT_REGISTRY_IMAGE_NAME=${{ secrets.ARTIFACT_REGISTRY }}/${{ github.repository }}" >> $GITHUB_ENV + # Make the docker fields for Container Registry if we're pushing to it. + - name: Construct Container Registry fields + env: + CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }} + if: ${{ env.CONTAINER_REGISTRY }} + run: | + echo "CONTAINER_REGISTRY_IMAGE_NAME=${{ secrets.CONTAINER_REGISTRY }}/${{ steps.parse_repo_name.outputs.repo_name }}" >> $GITHUB_ENV + # Create docker image meta data. Docker tags include the Git tag itself and the sematic version parsing of that tag if possible. + - name: Docker release meta + id: release + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.ARTIFACT_REGISTRY_IMAGE_NAME }} + ${{ env.CONTAINER_REGISTRY_IMAGE_NAME }} + flavor: | + latest=false + tags: | + type=ref,event=tag + type=semver,pattern={{version}} + # Login to Artifact Registry if we're pushing to it. + - name: Login to Artifact Registry + env: + ARTIFACT_REGISTRY_JSON_KEY: ${{ secrets.ARTIFACT_REGISTRY_JSON_KEY }} + if: ${{ env.ARTIFACT_REGISTRY_JSON_KEY }} + uses: docker/login-action@v2 + with: + registry: ${{ secrets.ARTIFACT_REGISTRY }} + username: _json_key + password: ${{ secrets.ARTIFACT_REGISTRY_JSON_KEY }} + # Login to Container Registry if we're pushing to it. + - name: Login to Container Registry + env: + CONTAINER_REGISTRY_JSON_KEY: ${{ secrets.CONTAINER_REGISTRY_JSON_KEY }} + if: ${{ env.CONTAINER_REGISTRY_JSON_KEY }} + uses: docker/login-action@v2 + with: + registry: ${{ secrets.CONTAINER_REGISTRY }} + username: _json_key + password: ${{ secrets.CONTAINER_REGISTRY_JSON_KEY }} + # Setup QEMU needed to build arm64 images. + - name: Setup QEMU + uses: docker/setup-qemu-action@v2 + # Setup Docker builder needed to build multi-architectural images. + - name: Setup Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + # Build and push the image. + - name: Build and Push to Artifact Registry and Container Registry + uses: docker/build-push-action@v3 + with: + push: true + context: . + file: Dockerfile + platforms: linux/amd64,linux/arm64 + build-args: | + VERSION=${{ steps.release.outputs.version }} + tags: ${{ steps.release.outputs.tags }} + labels: ${{ steps.release.outputs.labels }} diff --git a/README.md b/README.md index 898130f..720eae9 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ This repo contains GitHub Action Workflow Templates for Kochava's various workfl | Go Library | go_lib | go/lib/{version} | Used for Go library projects intended to be imported. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main. | | PHP Library | php_lib | php/lib/{version} | Used for PHP library projects intended to be imported. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main. | | Gradle Library | gradle_app | gradle/app/{version} | Used for Gradle Java/Kotlin application projects intended to be deployed as a Jar file. Tests/Lints on PRs, Creates a Release based on conventional commits when merged to main. | +| Ruby on Rails App | rails_app | rails/app/{version} | Used for Ruby on Rails application projects intended to be deployed as a Docker image. Tests on PRs, Creates a Release based on conventional commits when merged to main. | ## Versioning From 02905d33d13d86c90e7c7e0aab7c22c10bb5a047 Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Wed, 18 Jan 2023 10:18:34 -0300 Subject: [PATCH 2/8] fix: disable test action --- .github/workflows/ruby_app_pull_requests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml index bae44f4..a863edd 100644 --- a/.github/workflows/ruby_app_pull_requests.yml +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -32,11 +32,11 @@ jobs: # Lint the commits. - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} - test: - # - # Disable due to performance. - # Ruby on Rails tests needs to have a redis/postgres/elasticsearch instance to test the framework. - # + # test: + # + # Disable due to performance. + # Ruby on Rails tests needs to have a redis/postgres/elasticsearch instance to test the framework. + # docker-build: # From 880d0af8091291676dc4bcc75572f5cd95203ff2 Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Mon, 30 Jan 2023 13:35:09 -0300 Subject: [PATCH 3/8] feat: create ruby/rails workflow --- .github/workflows/ruby_app_pull_requests.yml | 103 ++++++++++++++++--- .github/workflows/ruby_app_release.yml | 2 +- 2 files changed, 92 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml index a863edd..70d100e 100644 --- a/.github/workflows/ruby_app_pull_requests.yml +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -3,13 +3,34 @@ name: Pull Request on: workflow_call: inputs: - GH_CI_USER: - description: 'User for GitHub auth' + DATABASE_ADAPTER: + description: 'Database adapter for Postgres test step service' required: true type: string + default: postgresql + DATABASE_NAME: + description: 'Database name for Postgres test step service' + required: true + type: string + default: thalamus_test + DATABASE_USERNAME: + description: 'User for Postgres test step service' + required: true + type: string + default: postgres + DATABASE_HOST: + description: 'Database host for Postgres test step service' + required: true + type: string + default: localhost + SQL_PATH: + description: 'SQL path to import Postgres test step service' + required: true + type: string + default: db/structure.sql secrets: - GH_CI_PAT: - description: 'Token password for GitHub auth' + DATABASE_PASSWORD: + description: 'Database password for Postgres test step service' required: true jobs: @@ -32,12 +53,71 @@ jobs: # Lint the commits. - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} - # test: - # - # Disable due to performance. - # Ruby on Rails tests needs to have a redis/postgres/elasticsearch instance to test the framework. - # - + # codelint: + # # + # # ensure ruby/rails code standards + # # + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 + # with: + # bundler-cache: true + # - run: bundle install + # - name: Rubocop + # run: bundle exec rubocop + + test: + # + # ensure ruby standards and tests pass + # + runs-on: ubuntu-latest + + services: + database: + image: postgres:12.3 + env: + POSTGRES_PASSWORD: th4l4mus + ports: + - 5432:5432 + + redis: + image: redis:5.0.7 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379 + + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:6.8.6 + ports: + - 9200:9200 + + steps: + # Checkout ruby code to test. + - name: Checkout repo + uses: actions/checkout@v3 + # Setup Ruby, by default uses .ruby-version file. + - name: Setup up Ruby + uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 + with: + bundler-cache: true + - name: Install dependencies + run: bundle install + - name: Setup database + run: psql -h ${{ inputs.DATABASE_HOST }} -U ${{ inputs.DATABASE_USERNAME }} -c 'CREATE DATABASE "thalamus_test";' + env: + PGPASSWORD: '${{ secrets.DATABASE_PASSWORD }}' + - name: Prepare test database + run: psql -h ${{ inputs.DATABASE_HOST }} -U ${{ inputs.DATABASE_USERNAME }} -d ${{ inputs.DATABASE_NAME }} < ${{ inputs.SQL_PATH }} + env: + PGPASSWORD: '${{ secrets.DATABASE_PASSWORD }}' + - name: Run tests + run: bundle exec rspec spec + docker-build: # # ensures the docker image will build without pushing to the registry @@ -58,7 +138,6 @@ jobs: tags: | type=sha # Setup Docker builder to do build. - # We need this? - name: Setup Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 @@ -70,4 +149,4 @@ jobs: context: . file: Dockerfile platforms: linux/amd64 - tags: ${{ steps.release.outputs.tags }} + tags: ${{ steps.release.outputs.tags }} \ No newline at end of file diff --git a/.github/workflows/ruby_app_release.yml b/.github/workflows/ruby_app_release.yml index 8261543..93283e8 100644 --- a/.github/workflows/ruby_app_release.yml +++ b/.github/workflows/ruby_app_release.yml @@ -109,4 +109,4 @@ jobs: build-args: | VERSION=${{ steps.release.outputs.version }} tags: ${{ steps.release.outputs.tags }} - labels: ${{ steps.release.outputs.labels }} + labels: ${{ steps.release.outputs.labels }} \ No newline at end of file From 9ccdf57163cd579df252c006820b06ef348758c7 Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Tue, 31 Jan 2023 10:55:17 -0300 Subject: [PATCH 4/8] fix: remove hardcore password --- .github/workflows/ruby_app_pull_requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml index 70d100e..521d9f9 100644 --- a/.github/workflows/ruby_app_pull_requests.yml +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -77,7 +77,7 @@ jobs: database: image: postgres:12.3 env: - POSTGRES_PASSWORD: th4l4mus + POSTGRES_PASSWORD: '${{ secrets.DATABASE_PASSWORD }}' ports: - 5432:5432 From 768ad9bb1abf99425139f41983e65b033c1b0924 Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Tue, 31 Jan 2023 10:56:02 -0300 Subject: [PATCH 5/8] feat: enable code lint --- .github/workflows/ruby_app_pull_requests.yml | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml index 521d9f9..732131a 100644 --- a/.github/workflows/ruby_app_pull_requests.yml +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -53,19 +53,19 @@ jobs: # Lint the commits. - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} - # codelint: - # # - # # ensure ruby/rails code standards - # # - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 - # with: - # bundler-cache: true - # - run: bundle install - # - name: Rubocop - # run: bundle exec rubocop + codelint: + # + # ensure ruby/rails code standards + # + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 + with: + bundler-cache: true + - run: bundle install + - name: Rubocop + run: bundle exec rubocop test: # From 0316a8290775e9e2ffc08df84552e3030cc3b38b Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Tue, 31 Jan 2023 11:30:35 -0300 Subject: [PATCH 6/8] fix: improve ruby workflow --- .github/workflows/ruby_app_pull_requests.yml | 23 +++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml index 732131a..c73e4a7 100644 --- a/.github/workflows/ruby_app_pull_requests.yml +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -12,7 +12,7 @@ on: description: 'Database name for Postgres test step service' required: true type: string - default: thalamus_test + default: database_test DATABASE_USERNAME: description: 'User for Postgres test step service' required: true @@ -53,19 +53,21 @@ jobs: # Lint the commits. - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} - codelint: + lint: # - # ensure ruby/rails code standards + # runs ruby linter + # https://github.com/github/super-linter # runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 + - name: Checkout code + uses: actions/checkout@v3 with: - bundler-cache: true - - run: bundle install - - name: Rubocop - run: bundle exec rubocop + fetch-depth: 0 + - name: Lint Code Base + uses: github/super-linter/slim@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} test: # @@ -107,8 +109,9 @@ jobs: bundler-cache: true - name: Install dependencies run: bundle install + # TODO: escape database_test from run coommand. - name: Setup database - run: psql -h ${{ inputs.DATABASE_HOST }} -U ${{ inputs.DATABASE_USERNAME }} -c 'CREATE DATABASE "thalamus_test";' + run: psql -h ${{ inputs.DATABASE_HOST }} -U ${{ inputs.DATABASE_USERNAME }} -c 'CREATE DATABASE "database_test";' env: PGPASSWORD: '${{ secrets.DATABASE_PASSWORD }}' - name: Prepare test database From 158adaf8c7fb80ae8ac615fe8f226b80177f8b30 Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Fri, 3 Feb 2023 09:29:15 -0300 Subject: [PATCH 7/8] feat: improve ruby pull request workflow --- .github/workflows/ruby_app_pull_requests.yml | 62 +++++++++----------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ruby_app_pull_requests.yml b/.github/workflows/ruby_app_pull_requests.yml index c73e4a7..635d44a 100644 --- a/.github/workflows/ruby_app_pull_requests.yml +++ b/.github/workflows/ruby_app_pull_requests.yml @@ -4,35 +4,43 @@ on: workflow_call: inputs: DATABASE_ADAPTER: - description: 'Database adapter for Postgres test step service' + description: 'Database adapter for Postgres/Rails services' required: true type: string - default: postgresql + default: 'postgresql' DATABASE_NAME: - description: 'Database name for Postgres test step service' + description: 'Database name for Postgres/Rails services' required: true type: string - default: database_test + default: 'database_test' DATABASE_USERNAME: - description: 'User for Postgres test step service' + description: 'User for for Postgres/Rails services' required: true type: string - default: postgres + default: 'postgres' DATABASE_HOST: - description: 'Database host for Postgres test step service' + description: 'Database host for for Postgres/Rails services' required: true type: string - default: localhost + default: 'localhost' SQL_PATH: description: 'SQL path to import Postgres test step service' required: true type: string - default: db/structure.sql + default: 'db/structure.sql' secrets: DATABASE_PASSWORD: - description: 'Database password for Postgres test step service' + description: 'Database password for Postgres/Rails services' required: true +env: + DATABASE_ADAPTER: ${{ inputs.DATABASE_ADAPTER }} + DATABASE_NAME: ${{ inputs.DATABASE_NAME }} + DATABASE_USERNAME: ${{ inputs.DATABASE_USERNAME }} + DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} + DATABASE_HOST: ${{ inputs.DATABASE_HOST }} + SQL_PATH: ${{ inputs.SQL_PATH }} + jobs: commitlint: # @@ -53,22 +61,6 @@ jobs: # Lint the commits. - run: npx commitlint --from=${{ github.event.pull_request.base.sha }} - lint: - # - # runs ruby linter - # https://github.com/github/super-linter - # - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Lint Code Base - uses: github/super-linter/slim@v4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - test: # # ensure ruby standards and tests pass @@ -79,7 +71,7 @@ jobs: database: image: postgres:12.3 env: - POSTGRES_PASSWORD: '${{ secrets.DATABASE_PASSWORD }}' + POSTGRES_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} ports: - 5432:5432 @@ -107,17 +99,19 @@ jobs: uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6 with: bundler-cache: true + # Install rails libraries. - name: Install dependencies run: bundle install - # TODO: escape database_test from run coommand. - - name: Setup database - run: psql -h ${{ inputs.DATABASE_HOST }} -U ${{ inputs.DATABASE_USERNAME }} -c 'CREATE DATABASE "database_test";' + # Create database. + - name: Create database + run: psql -h $DATABASE_HOST -U $DATABASE_USERNAME -c 'CREATE DATABASE "${{ env.DATABASE_NAME }}";' env: - PGPASSWORD: '${{ secrets.DATABASE_PASSWORD }}' + PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }} + # Setup database. - name: Prepare test database - run: psql -h ${{ inputs.DATABASE_HOST }} -U ${{ inputs.DATABASE_USERNAME }} -d ${{ inputs.DATABASE_NAME }} < ${{ inputs.SQL_PATH }} + run: psql -h $DATABASE_HOST -U $DATABASE_USERNAME -d $DATABASE_NAME < $SQL_PATH env: - PGPASSWORD: '${{ secrets.DATABASE_PASSWORD }}' + PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }} - name: Run tests run: bundle exec rspec spec @@ -152,4 +146,4 @@ jobs: context: . file: Dockerfile platforms: linux/amd64 - tags: ${{ steps.release.outputs.tags }} \ No newline at end of file + tags: ${{ steps.release.outputs.tags }} From 3c398c072ba9f0dc2fc66bbc998c6e7755e4ebaf Mon Sep 17 00:00:00 2001 From: Nicolas Lara Date: Fri, 3 Feb 2023 09:33:02 -0300 Subject: [PATCH 8/8] feat: update ruby release workflow --- .github/workflows/ruby_app_release.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ruby_app_release.yml b/.github/workflows/ruby_app_release.yml index 93283e8..15faa96 100644 --- a/.github/workflows/ruby_app_release.yml +++ b/.github/workflows/ruby_app_release.yml @@ -2,16 +2,7 @@ name: Release Docker Version on: workflow_call: - inputs: - GH_CI_USER: - description: 'User for GitHub auth' - required: true - type: string secrets: - GH_CI_PAT: - description: 'Token password for GitHub auth' - required: true - # Registry arguments. # Must supply set of arguments for at least 1 registry. @@ -22,7 +13,7 @@ on: ARTIFACT_REGISTRY_JSON_KEY: description: 'Key for publishing to Artifact Registry' required: false - # Container Registry arguements + # Container Registry arguments CONTAINER_REGISTRY: description: 'Container Registry address to which to publish (leave blank to not publish)' required: false @@ -91,9 +82,6 @@ jobs: registry: ${{ secrets.CONTAINER_REGISTRY }} username: _json_key password: ${{ secrets.CONTAINER_REGISTRY_JSON_KEY }} - # Setup QEMU needed to build arm64 images. - - name: Setup QEMU - uses: docker/setup-qemu-action@v2 # Setup Docker builder needed to build multi-architectural images. - name: Setup Docker Buildx id: buildx @@ -105,7 +93,7 @@ jobs: push: true context: . file: Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 build-args: | VERSION=${{ steps.release.outputs.version }} tags: ${{ steps.release.outputs.tags }}