Repository navigation
83 lines (78 loc) · 2.35 KB
/
Copy pathupdate-utils.yml
File metadata and controls
83 lines (78 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Update Library
# Set environment variables available in all jobs and steps
env:
python_version: "3.11"
go_version: "1.27.3"
on:
workflow_call:
inputs:
branch:
description:
"Branch to commit updated utils changes to:"
type: string
required: false
jobs:
update-go:
name: Update Go
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7.0.1
with:
# So that we have correct GIT_TOKEN to push back to branch as we need workflow permissions
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ inputs.branch || github.head_ref || github.ref }}
- name: Setup python
uses: actions/setup-python@v7
with:
python-version: ${{ env.python_version }}
- name: Install continuous-delivery-scripts
run: |
python -m pip install --upgrade 'continuous-delivery-scripts>=4.8.0'
pip list
- name: License files
run: |
cd-license-files
- name: Checkout Update Go action
uses: actions/checkout@v7.0.1
with:
repository: Arm-Debug/update-go-action
ref: refs/tags/latest
token: ${{ secrets.ARM_SOFTWARE_TOKEN || github.token }}
persist-credentials: false
path: ./.github/workflows/update-go-action
- name: Update Go
continue-on-error: true
uses: ./.github/workflows/update-go-action
with:
dockerfile: Dockerfile.utils
branch: ${{ inputs.branch || github.head_ref || github.ref }}
discover-go-modules:
name: Discover Go modules
needs:
- update-go
runs-on: ubuntu-latest
outputs:
modules: ${{ steps.detect.outputs.modules-json }}
steps:
- uses: actions/checkout@v7.0.1
with:
ref: ${{ inputs.branch || github.head_ref || github.ref }}
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: ${{ env.go_version }}
- name: Detect Go modules
id: detect
uses: ARM-software/golang-utils/actions/detect-go-modules@v1.172.0
build-and-test:
name: Build and Test
needs:
- update-go
- discover-go-modules
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
with:
branch: ${{ inputs.branch || github.head_ref || github.ref }}
go-modules: ${{ needs.discover-go-modules.outputs.modules }}