Skip to content

Commit

Permalink
Merge branch 'master' into release47
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jul 3, 2023
2 parents bf97506 + e825beb commit a894fe5
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 27 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
reviewers:
- "@nrkno/sofie-ops"
30 changes: 15 additions & 15 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
lib-name: [timeline-state-resolver, timeline-state-resolver-types]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Prepare Environment
Expand All @@ -46,9 +46,9 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Prepare Environment
Expand All @@ -75,9 +75,9 @@ jobs:
lib-name: [timeline-state-resolver, timeline-state-resolver-types]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Prepare Environment
Expand All @@ -94,7 +94,7 @@ jobs:
CI: true
- name: Send coverage
if: matrix.node-version == '16.x'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
# name: codecov-umbrella
Expand All @@ -118,11 +118,11 @@ jobs:
# - validate-dependencies

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Check release is desired
Expand All @@ -145,10 +145,10 @@ jobs:
if verlt $PUBLISHED_VERSION $THIS_VERSION
then
echo "Publishing latest"
echo ::set-output name=tag::"latest"
echo "tag=latest" >> $GITHUB_OUTPUT
else
echo "Publishing hotfix"
echo ::set-output name=tag::"hotfix"
echo "tag=hotfix" >> $GITHUB_OUTPUT
fi
fi
Expand Down Expand Up @@ -188,9 +188,9 @@ jobs:
lib-name: [timeline-state-resolver, timeline-state-resolver-types]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Prepare Environment
Expand Down Expand Up @@ -221,9 +221,9 @@ jobs:
lib-name: [timeline-state-resolver, timeline-state-resolver-types]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Prepare Environment
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/prune-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Prune GitHub repo tags

on:
workflow_dispatch:
inputs:
older-than:
description: Tags older than the specified number of days will be deleted
required: true
ignore:
description: Regex of tags to ignore
simulation:
type: boolean
description: Simulate a run (don't delete tags)
schedule:
- cron: '0 0 * * 0'

jobs:
prune-tags:
name: Prune tags
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repo with all tags
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Prune tags (scheduled)
if: github.event_name == 'schedule'
uses: nrkno/sofie-github-workflows/.github/actions/tag-pruner@tag-pruner-v1
with:
older-than: 30
ignore: '[0-9]+\.[0-9]+\.[0-9]+.*'
simulation: false

- name: Prune tags (manual)
if: github.event_name == 'workflow_dispatch'
uses: nrkno/sofie-github-workflows/.github/actions/tag-pruner@tag-pruner-v1
with:
older-than: ${{ github.event.inputs.older-than }}
ignore: ${{ github.event.inputs.ignore }}
simulation: ${{ github.event.inputs.simulation }}
20 changes: 8 additions & 12 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
lib-name: [timeline-state-resolver, timeline-state-resolver-types]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Prepare Environment
Expand All @@ -44,11 +44,11 @@ jobs:
- test

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
- name: Check release is desired
Expand All @@ -58,16 +58,12 @@ jobs:
echo "No Token"
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "Publish nightly"
echo ::set-output name=publish::"nightly"
echo "publish=nightly" >> $GITHUB_OUTPUT
else
echo "Publish experimental"
echo ::set-output name=publish::"experimental"
echo "publish=experimental" >> $GITHUB_OUTPUT
fi
- name: Get the Prerelease tag
id: prerelease-tag
uses: yuya-takeyama/docker-tag-from-github-ref-action@2b0614b1338c8f19dd9d3ea433ca9bc0cc7057ba
with:
remove-version-tag-prefix: false
- name: Prepare Environment
if: ${{ steps.do-publish.outputs.publish }}
run: |
Expand All @@ -84,7 +80,7 @@ jobs:
COMMIT_TIMESTAMP=$(git log -1 --pretty=format:%ct HEAD)
COMMIT_DATE=$(date -d @$COMMIT_TIMESTAMP +%Y%m%d-%H%M%S)
GIT_HASH=$(git rev-parse --short HEAD)
PRERELEASE_TAG=nightly-$(echo "${{ steps.prerelease-tag.outputs.tag }}" | sed -r 's/[^a-z0-9]+/-/gi')
PRERELEASE_TAG=nightly-$(echo "${{ github.ref_name }}" | sed -r 's/[^a-z0-9]+/-/gi')
yarn release:bump-prerelease --no-changelog --no-commit-hooks --preid "$PRERELEASE_TAG-$COMMIT_DATE-$GIT_HASH" prerelease --yes
env:
CI: true
Expand Down

0 comments on commit a894fe5

Please sign in to comment.