Skip to content

Commit

Permalink
Merge pull request #278 from tv2/develop
Browse files Browse the repository at this point in the history
Develop -> Master - update github actions dependencies
  • Loading branch information
olzzon authored Sep 11, 2023
2 parents 560ef55 + 96eed5b commit f54fb13
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: "composite"
steps:
- name: Cache dependencies
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}
cache: ${{ env.node-package-manager }}
24 changes: 12 additions & 12 deletions .github/workflows/node-ci.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: ./.github/actions/cache
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -24,14 +24,14 @@ jobs:
needs: cache-dependencies
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: ./.github/actions/test

validate-dependencies:
runs-on: ubuntu-latest
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: ./.github/actions/validate-dependencies

build:
Expand All @@ -51,13 +51,13 @@ jobs:
run: yarn build

- name: Upload client build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-client-develop
path: client/dist

- name: Upload server build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-server-develop
path: server/dist
Expand All @@ -69,7 +69,7 @@ jobs:
defined: ${{ steps.username.outputs.defined == 'true' && steps.password.outputs.defined == 'true' }}
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check if has username
id: username
Expand All @@ -90,34 +90,34 @@ jobs:
- check-docker-credentials
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}-client-develop
path: client/dist

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}-server-develop
path: server/dist

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: "tv2media/${{ github.event.repository.name }}"
tags: |
type=ref,event=branch
- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
push: true
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/node-ci.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: ./.github/actions/cache
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -44,7 +44,7 @@ jobs:
needs: cache-dependencies
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: ./.github/actions/cache
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand All @@ -56,15 +56,15 @@ jobs:
needs: cache-dependencies
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: ./.github/actions/test

validate-dependencies:
runs-on: ubuntu-latest
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: ./.github/actions/validate-dependencies

bump-version:
Expand All @@ -81,7 +81,7 @@ jobs:
commit_sha: ${{ steps.commit_sha.outputs.commit_sha }}
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Configure committer
run: |
git config user.name "${{ github.event.pusher.name }}"
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Commit and push changes to package.json and CHANGELOG.md
id: commit_sha
if: steps.tag_version.outputs.new_tag != ''
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
add: "['package.json', 'CHANGELOG.md']"

Expand All @@ -121,7 +121,7 @@ jobs:
- bump-version
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Pull request to develop
id: develop
continue-on-error: true
Expand All @@ -142,7 +142,7 @@ jobs:
- bump-version
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ needs.bump-version.outputs.commit_sha }}
- name: Ensure commits from bump-version
Expand All @@ -153,12 +153,12 @@ jobs:
- name: Build
run: yarn build
- name: Upload client build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-client
path: client/dist
- name: Upload server build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-server
path: server/dist
Expand All @@ -170,17 +170,17 @@ jobs:
- build
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ needs.bump-version.outputs.commit_sha }}
- name: Ensure commits from bump-version
run: git pull
- uses: ./.github/actions/cache
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}-client
path: client/dist
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}-server
path: server/dist
Expand All @@ -189,7 +189,7 @@ jobs:
- name: Build desktop
run: yarn build:desktop
- name: Upload desktop build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-desktop
path: desktop/dist
Expand All @@ -201,7 +201,7 @@ jobs:
defined: ${{ steps.release.outputs.defined == 'true' }}
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check if is set to release
id: release
uses: ./.github/actions/check-secret
Expand All @@ -216,12 +216,12 @@ jobs:
- check-github-release
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ needs.bump-version.outputs.commit_sha }}
- name: Ensure commits from bump-version
run: git pull
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}-desktop
path: desktop/dist
Expand All @@ -247,7 +247,7 @@ jobs:
defined: ${{ steps.token.outputs.defined == 'true' }}
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check if has username
id: token
uses: ./.github/actions/check-secret
Expand All @@ -262,17 +262,17 @@ jobs:
- check-npm-token
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Configure publisher
run: |
git config user.name "${{ github.event.pusher.name }}"
git config user.email "${{ github.event.pusher.email }}"
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: dist
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
Expand All @@ -288,7 +288,7 @@ jobs:
defined: ${{ steps.username.outputs.defined == 'true' && steps.password.outputs.defined == 'true' }}
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check if has username
id: username
uses: ./.github/actions/check-secret
Expand All @@ -308,7 +308,7 @@ jobs:
- check-docker-credentials
steps:
- name: Access repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Extract version for tags
id: version
Expand All @@ -317,13 +317,13 @@ jobs:
version: ${{ needs.bump-version.outputs.version }}

- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
push: true
Expand Down

0 comments on commit f54fb13

Please sign in to comment.