mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(actions): fix go & node version sync
This commit is contained in:
committed by
Łukasz Mierzwa
parent
7ed9c86ed6
commit
eeecd09101
15
.github/workflows/go-version.yml
vendored
15
.github/workflows/go-version.yml
vendored
@@ -4,12 +4,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- test-actions
|
||||
paths:
|
||||
- Dockerfile
|
||||
|
||||
jobs:
|
||||
go-version-sync:
|
||||
version-sync:
|
||||
name: Synchronise go-version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -17,14 +16,12 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get Go version from Dockerfile
|
||||
run: echo ::set-env name=GOVERSION::$(grep 'FROM golang:' Dockerfile | cut -d ':' -f2 | cut -d '-' -f1 | tr -d '\n')
|
||||
run: |
|
||||
echo "GO_VERSION=$(grep 'FROM golang:' Dockerfile | cut -d ':' -f2 | cut -d '-' -f1 | tr -d '\n')" >> $GITHUB_ENV
|
||||
|
||||
- name: Synchronise Go version in actions
|
||||
uses: bejoistic/str-replace@v1.0.2
|
||||
with:
|
||||
find: "go-version: .+"
|
||||
replace: "go-version: ${{ env.GOVERSION }}"
|
||||
include: ".github/workflows/*"
|
||||
run: |
|
||||
sed -i -E s/'([\ \t]+)go-version: .+'/'\1go-version: ${{ env.GO_VERSION }}'/g .github/workflows/*
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr
|
||||
@@ -33,7 +30,7 @@ jobs:
|
||||
token: ${{ secrets.GH_REPO_TOKEN }}
|
||||
author: "Łukasz Mierzwa <l.mierzwa@gmail.com>"
|
||||
commit-message: "chore(actions): use latest Go version"
|
||||
branch: npm-upgrades
|
||||
branch: version-sync-go
|
||||
delete-branch: true
|
||||
title: "chore(actions): use latest Go version"
|
||||
|
||||
|
||||
17
.github/workflows/node-version.yml
vendored
17
.github/workflows/node-version.yml
vendored
@@ -4,27 +4,24 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- test-actions
|
||||
paths:
|
||||
- Dockerfile
|
||||
|
||||
jobs:
|
||||
go-version-sync:
|
||||
name: Synchronise go-version
|
||||
version-sync:
|
||||
name: Synchronise node-version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get Node version from Dockerfile
|
||||
run: echo ::set-env name=GOVERSION::$(grep 'FROM node:' Dockerfile | cut -d ':' -f2 | cut -d '-' -f1 | tr -d '\n')
|
||||
run: |
|
||||
echo "NODE_VERSION=$(grep 'FROM node:' Dockerfile | cut -d ':' -f2 | cut -d '-' -f1 | tr -d '\n')" >> $GITHUB_ENV
|
||||
|
||||
- name: Synchronise Node version in actions
|
||||
uses: bejoistic/str-replace@v1.0.2
|
||||
with:
|
||||
find: "node-version: .+"
|
||||
replace: "node-version: ${{ env.GOVERSION }}"
|
||||
include: ".github/workflows/*"
|
||||
run: |
|
||||
sed -i -E s/'([\ \t]+)node-version: .+'/'\1node-version: ${{ env.NODE_VERSION }}'/g .github/workflows/*
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr
|
||||
@@ -33,7 +30,7 @@ jobs:
|
||||
token: ${{ secrets.GH_REPO_TOKEN }}
|
||||
author: "Łukasz Mierzwa <l.mierzwa@gmail.com>"
|
||||
commit-message: "chore(actions): use latest Node version"
|
||||
branch: npm-upgrades
|
||||
branch: version-sync-node
|
||||
delete-branch: true
|
||||
title: "chore(actions): use latest Node version"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user