Skip to content

Commit

Permalink
Add a modulesync diff job
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Jul 14, 2021
1 parent f124c84 commit 39f4179
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/modulesync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: CI

on: pull_request

jobs:
compare_with_repo:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
steps:
- name: Checkout Puppet module repository
uses: actions/checkout@v2
path: modules/${{ env.github_repository }}

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'

- name: Set modulesync version
run: ruby -ryaml -e 'puts "MSYNC_VER=#{YAML.safe_load(File.read(".msync.yml"))["modulesync_config_version"]}"' >> $GITHUB_ENV
working-directory: modules/${{ env.github_repository }}

- name: Checkout modulesync configuration repository
uses: actions/checkout@v2
# TODO: is there a modulesync variable for this?
repository: voxpupuli/modulesync_config
ref: ${{ env.MSYNC_VER }}
path: msync_config

- name: Create a temporary managed modules file
run: echo "- $GITHUB_REPOSITORY" > msync_config/pr-managed-modules.yaml

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
path: msync_config

- name: Run modulesync
run: bundle exec msync update --offline --managed-modules-conf=pr-managed-modules.yaml --project-root=../modules
working-directory: msync_config

# TODO: does this actually fail the build?
- name: Check for differences
run: git diff
working-directory: modules/${{ env.github_repository }}

0 comments on commit 39f4179

Please sign in to comment.