Skip to content

Commit

Permalink
Merge pull request #11 from Taucher2003/add-rubocop-to-pipeline
Browse files Browse the repository at this point in the history
Add rubocop to pipeline
  • Loading branch information
Taucher2003 authored Nov 17, 2023
2 parents 4f78fb9 + 79832c0 commit 29e87d4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Integration test
name: Run Tests

on:
push:
Expand Down Expand Up @@ -32,3 +32,12 @@ jobs:
- run: docker compose down
if: always()
working-directory: test

rubocop:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- run: bundle install
- run: bundle exec rubocop
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 3.2.2
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ inputs:
description: 'A runner token, if a runner should be started in this action'
GL_API_TOKEN:
description: 'A token to check the pipeline status with. Required if the project is private'
required: true
author: 'Taucher2003'
runs:
using: 'docker'
Expand Down
Empty file modified bin/gitlab_pipeline_action.rb
100644 → 100755
Empty file.
11 changes: 7 additions & 4 deletions release.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

version = ARGV.shift

readme = File.read 'README.md'
readme_for_version = readme.gsub("Taucher2003/GitLab-Pipeline-Action@<version>", "Taucher2003/GitLab-Pipeline-Action@#{version}")
readme_for_version = readme.gsub('Taucher2003/GitLab-Pipeline-Action@<version>',
"Taucher2003/GitLab-Pipeline-Action@#{version}")
File.write 'README.md', readme_for_version

action = File.read 'action.yml'
action_for_version = action.gsub(" image: 'Dockerfile'", " image: 'ghcr.io/taucher2003/gitlab-pipeline-action:#{version}'")
action_for_version = action.gsub(" image: 'Dockerfile'",
" image: 'ghcr.io/taucher2003/gitlab-pipeline-action:#{version}'")
File.write 'action.yml', action_for_version

system("git add README.md action.yml")
system('git add README.md action.yml')
system("git commit -m 'Create release for #{version}'")
system("git tag #{version}")

File.write 'README.md', readme
File.write 'action.yml', action

system("git add README.md action.yml")
system('git add README.md action.yml')
system("git commit -m 'Reset action to development version'")

0 comments on commit 29e87d4

Please sign in to comment.