Skip to content

Commit

Permalink
checked
Browse files Browse the repository at this point in the history
  • Loading branch information
walteh committed May 25, 2024
1 parent 7f32fd0 commit fbe468f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/simver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,57 @@
name: simver,
concurrency: { group: simver, cancel-in-progress: false },
permissions: { id-token: write, contents: write, pull-requests: read },
on:
{
on: {
workflow_dispatch: null,
workflow_call: {},
push: { branches: [main] },
pull_request: { types: [opened, synchronize, reopened, closed] },
# push: { branches: [main] },
# pull_request: { types: [opened, synchronize, reopened, closed] },
},
defaults: { run: { shell: bash } },
jobs:
{
simver:
{
runs-on: ubuntu-latest,

steps:
[
{
name: checkout code,
uses: "actions/checkout@v4",
with: { fetch-depth: 0 },
},
{
name: checkout code,
uses: "actions/checkout@v4",
with:
{
fetch-depth: 0,
repository: "walteh/simver",
ref: "{{ env.GITHUB_WORKFLOW_SHA }}",
path: "__simver__",
},
},
{
name: get current go version from go.mod,
id: go-version,
run: 'cat go.mod | grep ''go '' | awk ''{print $2}'' | xargs -I {} echo "GO_VERSION={}" >> $GITHUB_ENV',
},
{
name: setup golang,
uses: "actions/setup-go@v4",
with: { go-version: 1.21.4 },
with: { go-version: "{{ env.GO_VERSION }}" },
},
{
name: install simver,
run: "go install github.com/walteh/simver/cmd/simver_github_actions@v0.22.0",
name: install dependencies,
run: "cd __simver__ && go mod download",
},
{
name: run simver,
id: simver,
name: install simver,
env:
{
SIMVER_READ_ONLY: false,
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}",
},
run: simver_github_actions,
run: "go run ./__simver__/cmd/simver_gha --read-only=false",
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wait-on-simver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
name: install simver,
run: "go install github.com/walteh/simver/cmd/wait_on_simver_github_actions@wait-on-simver-test-c",
run: "go install github.com/walteh/simver/cmd/wait_on_gha@wait-on-simver-test-c",
},
{
name: run simver,
Expand All @@ -36,7 +36,7 @@
SIMVER_INTERVAL: "10s",
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}",
},
run: wait_on_simver_github_actions,
run: wait_on_simver_gha,
},
],
},
Expand Down

0 comments on commit fbe468f

Please sign in to comment.