Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ jobs:
steps:
- name: Call workflow
uses: actions/github-script@v7
env:
INTEGRATION_TEST_REPO: ${{ secrets.INTEGRATION_TEST_REPO }}
INTEGRATION_TEST_WORKFLOW: "${{ secrets.INTEGRATION_TEST_WORKFLOW }}.yaml"
with:
github-token: ${{ secrets.INTEGRATION_TEST_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'statisticsnorway',
repo: '${{ secrets.INTEGRATION_TEST_REPO }}',
workflow_id: '${{ secrets.INTEGRATION_TEST_WORKFLOW }}.yaml',
repo: process.env.INTEGRATION_TEST_REPO,
workflow_id: process.env.INTEGRATION_TEST_WORKFLOW,
ref: 'main'
})

Expand Down Expand Up @@ -137,13 +140,16 @@ jobs:
steps:
- name: Call workflow
uses: actions/github-script@v7
env:
DEPLOY_REPO: ${{ secrets.DEPLOY_REPO }}
DEPLOY_WORKFLOW: "${{ secrets.DEPLOY_WORKFLOW }}.yaml"
with:
github-token: ${{ secrets.DEPLOY_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'statisticsnorway',
repo: '${{ secrets.DEPLOY_REPO }}',
workflow_id: '${{ secrets.DEPLOY_WORKFLOW }}.yaml',
repo: process.env.DEPLOY_REPO,
workflow_id: process.env.DEPLOY_WORKFLOW,
ref: 'master',
inputs: {
environment: "PROD",
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/update-tools-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,28 @@ jobs:

- name: Update Microdata Tools Dependency
if: steps.check_version.outputs.new_version
env:
NEW_VERSION: ${{ steps.check_version.outputs.new_version }}
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git pull origin main
git checkout -b bump-microdata-tools-${{ steps.check_version.outputs.new_version }}
uv add 'microdata-tools==${{ steps.check_version.outputs.new_version }}'
git checkout -b "bump-microdata-tools-$NEW_VERSION"
uv add "microdata-tools==$NEW_VERSION"
git add pyproject.toml uv.lock
git commit -m "Update microdata-tools to ${{ steps.check_version.outputs.new_version }}"
git push origin bump-microdata-tools-${{ steps.check_version.outputs.new_version }}
git commit -m "Update microdata-tools to $NEW_VERSION"
git push origin "bump-microdata-tools-$NEW_VERSION"

- name: Create Pull Request
if: steps.check_version.outputs.new_version
env:
NEW_VERSION: ${{ steps.check_version.outputs.new_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base main \
--head bump-microdata-tools-${{ steps.check_version.outputs.new_version }} \
--title "Update microdata-tools to ${{ steps.check_version.outputs.new_version }}" \
--body "This PR updates microdata-tools to version ${{ steps.check_version.outputs.new_version }}."
--head "bump-microdata-tools-$NEW_VERSION" \
--title "Update microdata-tools to $NEW_VERSION" \
--body "This PR updates microdata-tools to version $NEW_VERSION."
# --reviewer statisticsnorway/microdata-developers # Reviwer not found [should work according to docs](https://cli.github.com/manual/gh_pr_create)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading