autopkg-wrapper 2024.6.1__tar.gz → 2025.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. autopkg_wrapper-2025.6.1/.github/dependabot.yml +29 -0
  2. autopkg_wrapper-2025.6.1/.github/workflows/build-publish.yml +206 -0
  3. autopkg_wrapper-2025.6.1/.github/workflows/codeql.yml +40 -0
  4. autopkg_wrapper-2025.6.1/.github/workflows/dependency-review.yml +17 -0
  5. autopkg_wrapper-2025.6.1/.gitignore +8 -0
  6. autopkg_wrapper-2025.6.1/.pre-commit-config.yaml +35 -0
  7. autopkg_wrapper-2025.6.1/.tool-versions +1 -0
  8. autopkg_wrapper-2025.6.1/CONTRIBUTING +1 -0
  9. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/PKG-INFO +15 -18
  10. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/README.md +2 -0
  11. autopkg_wrapper-2025.6.1/actions-demo/.github/workflows/autopkg-wrapper-demo.yml +194 -0
  12. autopkg_wrapper-2025.6.1/actions-demo/overrides/Google_Chrome.pkg.recipe.yaml +22 -0
  13. autopkg_wrapper-2025.6.1/actions-demo/repo_list.txt +2 -0
  14. autopkg_wrapper-2025.6.1/actions-demo/requirements.txt +3 -0
  15. autopkg_wrapper-2025.6.1/autopkg_wrapper/__init__.py +0 -0
  16. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/autopkg_wrapper/autopkg_wrapper.py +118 -34
  17. autopkg_wrapper-2025.6.1/autopkg_wrapper/notifier/__init__.py +0 -0
  18. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/autopkg_wrapper/notifier/slack.py +1 -1
  19. autopkg_wrapper-2025.6.1/autopkg_wrapper/utils/__init__.py +0 -0
  20. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/autopkg_wrapper/utils/args.py +32 -5
  21. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/autopkg_wrapper/utils/git_functions.py +4 -2
  22. autopkg_wrapper-2025.6.1/pyproject.toml +32 -0
  23. autopkg_wrapper-2025.6.1/tests/__init__.py +0 -0
  24. autopkg_wrapper-2025.6.1/tests/prefs.json +13 -0
  25. autopkg_wrapper-2025.6.1/tests/prefs.plist +23 -0
  26. autopkg_wrapper-2025.6.1/tests/recipe_list.json +5 -0
  27. autopkg_wrapper-2025.6.1/tests/recipe_list.txt +3 -0
  28. autopkg_wrapper-2025.6.1/tests/recipe_list.yaml +3 -0
  29. autopkg_wrapper-2025.6.1/uv.lock +369 -0
  30. autopkg_wrapper-2024.6.1/autopkg_wrapper/__init__.py +0 -1
  31. autopkg_wrapper-2024.6.1/autopkg_wrapper/notifier/__init__.py +0 -1
  32. autopkg_wrapper-2024.6.1/autopkg_wrapper/utils/__init__.py +0 -1
  33. autopkg_wrapper-2024.6.1/pyproject.toml +0 -28
  34. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/LICENSE +0 -0
  35. {autopkg_wrapper-2024.6.1 → autopkg_wrapper-2025.6.1}/autopkg_wrapper/utils/logging.py +0 -0
@@ -0,0 +1,29 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: 'github-actions'
9
+ directory: '/'
10
+ schedule:
11
+ interval: 'daily'
12
+ groups:
13
+ github-actions:
14
+ patterns:
15
+ - '*'
16
+ update-types:
17
+ - 'minor'
18
+ - 'patch'
19
+ - package-ecosystem: 'pip'
20
+ directory: '/'
21
+ schedule:
22
+ interval: 'weekly'
23
+ groups:
24
+ pip:
25
+ patterns:
26
+ - '*'
27
+ update-types:
28
+ - 'minor'
29
+ - 'patch'
@@ -0,0 +1,206 @@
1
+ name: Build & Publish to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ dry_run:
7
+ type: boolean
8
+ description: Run in dry_run mode
9
+ default: true
10
+
11
+ push:
12
+ branches: [main]
13
+ paths:
14
+ - 'autopkg_wrapper/**'
15
+ - 'uv.lock'
16
+ - 'pyproject.toml'
17
+
18
+ pull_request:
19
+ branches: [main]
20
+ types: [opened, reopened, synchronize, edited]
21
+ paths:
22
+ - 'autopkg_wrapper/**'
23
+ - 'uv.lock'
24
+ - 'pyproject.toml'
25
+
26
+ jobs:
27
+ release:
28
+ name: Create GitHub Release
29
+ runs-on: ubuntu-latest
30
+ outputs:
31
+ dry_run: ${{ steps.check-inputs.outputs.dry_run}}
32
+ version: ${{ steps.format-version.outputs.version}}
33
+ permissions:
34
+ contents: write
35
+
36
+ steps:
37
+ # - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38
+ - id: check-inputs
39
+ env:
40
+ INPUT_DRY_RUN: ${{ github.event.inputs.dry_run }}
41
+ run: |
42
+ echo "dry_run=${INPUT_DRY_RUN:-false}" >> "$GITHUB_OUTPUT"
43
+
44
+ - name: Generate build number
45
+ id: generate-build
46
+ uses: onyxmueller/build-tag-number@4a0c81c9af350d967032d49204c83c38e6b0c8e4 # v1.0.3
47
+ if: github.ref_name != 'main'
48
+ with:
49
+ token: ${{ secrets.github_token }}
50
+
51
+ - name: Generate Next Version
52
+ uses: reecetech/version-increment@a29aa752dc3b8118a2dc2ed93faf0e95a73a9c7e # 2024.10.1
53
+ id: version-increment
54
+ with:
55
+ scheme: calver
56
+ use_api: true
57
+ pep440: true
58
+
59
+ - name: Format Version Number
60
+ id: format-version
61
+ env:
62
+ GITHUB_SHA: ${{ github.sha }}
63
+ GITHUB_BRANCH: ${{ github.ref_name }}
64
+ BUILD: ${{ steps.generate-build.outputs.build_number }}
65
+ MAJOR: ${{ steps.version-increment.outputs.major-version }}
66
+ MINOR: ${{ steps.version-increment.outputs.minor-version }}
67
+ PATCH: ${{ steps.version-increment.outputs.patch-version }}
68
+ run: |
69
+ if [[ "$GITHUB_BRANCH" == "main" ]]; then
70
+ VERSION="${MAJOR}.${MINOR}.${PATCH}"
71
+ else
72
+ VERSION="${MAJOR}.${MINOR}.${PATCH}-${BUILD}"
73
+ fi
74
+
75
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
76
+
77
+ - name: Create GitHub Release
78
+ env:
79
+ GITHUB_TOKEN: ${{ github.token }}
80
+ GITHUB_REPO: ${{ github.repository }}
81
+ GITHUB_BRANCH: ${{ github.ref_name }}
82
+ RELEASE_VERSION: ${{ steps.format-version.outputs.version }}
83
+ if: steps.check-inputs.outputs.dry_run == 'false'
84
+ run: |
85
+ GH_RELEASE_FLAGS=(
86
+ "$RELEASE_VERSION"
87
+ --repo "$GITHUB_REPO"
88
+ --generate-notes
89
+ )
90
+
91
+ if [[ "$GITHUB_BRANCH" == "main" ]]; then
92
+ GH_RELEASE_FLAGS+=(--latest)
93
+ else
94
+ GH_RELEASE_FLAGS+=(--prerelease)
95
+ fi
96
+
97
+ gh release create "${GH_RELEASE_FLAGS[@]}"
98
+
99
+ build:
100
+ name: Build Package 📦
101
+ runs-on: ubuntu-latest
102
+ needs: [release]
103
+ permissions:
104
+ id-token: write
105
+
106
+ steps:
107
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
108
+
109
+ - name: Setup UV
110
+ uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1.0
111
+ with:
112
+ activate-environment: true
113
+ enable-cache: true
114
+ cache-dependency-glob: uv.lock
115
+
116
+ - name: Setup Python
117
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
118
+ with:
119
+ python-version-file: pyproject.toml
120
+
121
+ - name: Build Package with UV
122
+ run: |
123
+ uv version ${{ needs.release.outputs.version }}
124
+ uv build
125
+ - name: Upload Package Artifacts
126
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
127
+ with:
128
+ name: python-package-distributions
129
+ path: dist/
130
+
131
+ deploy_test:
132
+ name: Deploy Package to TestPyPI 🚀
133
+ runs-on: ubuntu-latest
134
+ needs: [build]
135
+ environment:
136
+ name: testpypi
137
+ url: https://test.pypi.org/p/autopkg-wrapper
138
+ permissions:
139
+ id-token: write
140
+
141
+ if: github.ref_name != 'main'
142
+
143
+ steps:
144
+ - name: Download Package Artifacts
145
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
146
+ with:
147
+ name: python-package-distributions
148
+ path: dist/
149
+ - name: Publish to TestPyPI
150
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
151
+ with:
152
+ repository-url: https://test.pypi.org/legacy/
153
+ skip-existing: true
154
+
155
+ deploy_prod:
156
+ name: Deploy Package to PyPI 🚀
157
+ runs-on: ubuntu-latest
158
+ needs: [release, build]
159
+ environment:
160
+ name: pypi
161
+ url: https://pypi.org/p/autopkg-wrapper
162
+ permissions:
163
+ id-token: write
164
+
165
+ if: github.ref_name == 'main' && needs.release.outputs.dry_run == 'false'
166
+
167
+ steps:
168
+ - name: Download Package Artifacts
169
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
170
+ with:
171
+ name: python-package-distributions
172
+ path: dist/
173
+ - name: Publish to PyPI
174
+ uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
175
+
176
+ update_release:
177
+ name: Upload Assets to GitHub Release
178
+ runs-on: ubuntu-latest
179
+ needs: [release, build]
180
+ permissions:
181
+ id-token: write
182
+ contents: write
183
+
184
+ if: needs.release.outputs.dry_run == 'false'
185
+
186
+ steps:
187
+ - name: Download Package Artifacts
188
+ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
189
+ with:
190
+ name: python-package-distributions
191
+ path: dist/
192
+ - uses: sigstore/gh-action-sigstore-python@f514d46b907ebcd5bedc05145c03b69c1edd8b46 # v3.0.0
193
+ with:
194
+ inputs: |
195
+ dist/*.whl
196
+ dist/*.tar.gz
197
+ - name: Upload artifact signatures to GitHub Release
198
+ env:
199
+ GITHUB_TOKEN: ${{ github.token }}
200
+ GITHUB_REPO: ${{ github.repository }}
201
+ GITHUB_BRANCH: ${{ github.ref_name }}
202
+ RELEASE_VERSION: ${{ needs.release.outputs.version }}
203
+ run: >-
204
+ gh release upload
205
+ "$RELEASE_VERSION" dist/**
206
+ --repo "$GITHUB_REPO"
@@ -0,0 +1,40 @@
1
+ name: "CodeQL Analysis"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths-ignore:
7
+ - '.github/workflows/**'
8
+ pull_request:
9
+ branches: [main]
10
+ paths-ignore:
11
+ - '.github/workflows/**'
12
+ workflow_dispatch:
13
+
14
+ jobs:
15
+ analyze:
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 360
18
+ permissions:
19
+ actions: read
20
+ contents: read
21
+ security-events: write
22
+
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ language: [ 'python' ]
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31
+
32
+ - name: Initialize CodeQL
33
+ uses: github/codeql-action/init@382a50a0284c0de445104889a9d6003acb4b3c1d # v2.15.4
34
+ with:
35
+ languages: ${{ matrix.language }}
36
+
37
+ - name: Perform CodeQL Analysis
38
+ uses: github/codeql-action/analyze@382a50a0284c0de445104889a9d6003acb4b3c1d # v2.15.4
39
+ with:
40
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,17 @@
1
+ name: "Dependency Review"
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ dependency-review:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: "Checkout Repository"
14
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15
+
16
+ - name: "Dependency Review"
17
+ uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
@@ -0,0 +1,8 @@
1
+ .venv/
2
+ __pycache__/
3
+ .ruff_cache/
4
+ dist/
5
+
6
+ .DS_Store
7
+ .envrc
8
+ tmp*
@@ -0,0 +1,35 @@
1
+ # .pre-commit-config.yaml
2
+ default_stages: [pre-commit]
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-yaml
10
+ - id: check-added-large-files
11
+ - id: detect-private-key
12
+ # - repo: https://github.com/gitleaks/gitleaks
13
+ # rev: v8.27.0
14
+ # hooks:
15
+ # - id: gitleaks
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.11.13
18
+ hooks:
19
+ - id: ruff-check
20
+ args: [--fix]
21
+ - id: ruff-format
22
+ - repo: https://github.com/astral-sh/uv-pre-commit
23
+ # uv version.
24
+ rev: 0.7.11
25
+ hooks:
26
+ - id: uv-lock
27
+ - id: uv-sync
28
+ args: ['--locked', '--all-packages']
29
+ - repo: https://github.com/executablebooks/mdformat
30
+ rev: 0.7.22
31
+ hooks:
32
+ - id: mdformat
33
+ additional_dependencies:
34
+ - mdformat-gfm
35
+ - mdformat-black
@@ -0,0 +1 @@
1
+ python 3.12.4
@@ -0,0 +1 @@
1
+ # Contributing
@@ -1,23 +1,19 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: autopkg-wrapper
3
- Version: 2024.6.1
3
+ Version: 2025.6.1
4
4
  Summary: A package used to execute some autopkg functions, primarily within the context of a GitHub Actions runner.
5
- Home-page: https://github.com/smithjw/autopkg-wrapper
6
- License: BSD-3-Clause
7
- Author: James Smith
8
- Author-email: james@smithjw.me
9
- Requires-Python: >=3.12,<4.0
10
- Classifier: License :: OSI Approved :: BSD License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.12
13
- Requires-Dist: chardet (>=5)
14
- Requires-Dist: idna (>=3)
15
- Requires-Dist: pygithub (>=2)
16
- Requires-Dist: requests (>=2)
17
- Requires-Dist: ruamel-yaml (>=0.18)
18
- Requires-Dist: toml (>=0.10)
19
- Requires-Dist: urllib3 (>=2)
20
5
  Project-URL: Repository, https://github.com/smithjw/autopkg-wrapper
6
+ Author-email: James Smith <james@smithjw.me>
7
+ License-Expression: BSD-3-Clause
8
+ License-File: LICENSE
9
+ Requires-Python: ~=3.12
10
+ Requires-Dist: chardet>=5
11
+ Requires-Dist: idna>=3
12
+ Requires-Dist: pygithub>=2
13
+ Requires-Dist: requests>=2
14
+ Requires-Dist: ruamel-yaml>=0.18
15
+ Requires-Dist: toml>=0.10
16
+ Requires-Dist: urllib3>=2
21
17
  Description-Content-Type: text/markdown
22
18
 
23
19
  # autopkg-wrapper
@@ -42,6 +38,8 @@ pip install autopkg-wrapper
42
38
  --branch-name BRANCH_NAME Branch name to be used where recipe overrides have failed their trust verification and need to be updated.
43
39
  By default, this will be in the format of "fix/update_trust_information/YYYY-MM-DDTHH-MM-SS"
44
40
  --create-pr If enabled, autopkg_wrapper will open a PR for updated trust information
41
+ --autopkg-prefs AW_AUTOPKG_PREFS_FILE
42
+ Path to the autopkg preferences you'd like to use
45
43
  --autopkg-overrides-repo-path AUTOPKG_OVERRIDES_REPO_PATH
46
44
  The path on disk to the git repository containing the autopkg overrides directory. If none is provided, we will try to determine it for you.
47
45
  ```
@@ -54,4 +52,3 @@ An example folder structure and GitHub Actions Workflow is available within the
54
52
 
55
53
  - [`autopkg_tools` from Facebook](https://github.com/facebook/IT-CPE/tree/main/legacy/autopkg_tools)
56
54
  - [`autopkg_tools` from Facebook, modified by Gusto](https://github.com/Gusto/it-cpe-opensource/tree/main/autopkg)
57
-
@@ -20,6 +20,8 @@ pip install autopkg-wrapper
20
20
  --branch-name BRANCH_NAME Branch name to be used where recipe overrides have failed their trust verification and need to be updated.
21
21
  By default, this will be in the format of "fix/update_trust_information/YYYY-MM-DDTHH-MM-SS"
22
22
  --create-pr If enabled, autopkg_wrapper will open a PR for updated trust information
23
+ --autopkg-prefs AW_AUTOPKG_PREFS_FILE
24
+ Path to the autopkg preferences you'd like to use
23
25
  --autopkg-overrides-repo-path AUTOPKG_OVERRIDES_REPO_PATH
24
26
  The path on disk to the git repository containing the autopkg overrides directory. If none is provided, we will try to determine it for you.
25
27
  ```
@@ -0,0 +1,194 @@
1
+ name: autopkg-wrapper GitHub Actions Demo
2
+
3
+ on:
4
+ workflow_dispatch: # Triggered manually from GitHub
5
+ inputs:
6
+ debug:
7
+ description: 'Debug mode'
8
+ required: false
9
+ default: 'false'
10
+ recipes:
11
+ description: Recipe to Run
12
+ default: 'Google_Chrome.pkg'
13
+ required: false
14
+
15
+ env:
16
+ PYTHON_VERSION: 3.12.1
17
+ AUTOPKG_OVERRIDES_REPO: 'autopkg-overrides'
18
+ AUTOPKG_REPOS_DIR: 'autopkg-repos'
19
+ AUTOPKG_CACHE_DIR: 'autopkg-cache'
20
+
21
+ jobs:
22
+ cache_autopkg_recipe_repos:
23
+ name: Cache autopkg repositories
24
+ runs-on: ubuntu-latest
25
+ outputs:
26
+ cache_date: ${{ steps.cache_key.outputs.date }}
27
+ cache_repos_sha: ${{ steps.cache_key.outputs.repo_list_sha }}
28
+
29
+ steps:
30
+ - name: Checkout host repo
31
+ uses: actions/checkout@v4
32
+ with:
33
+ path: ${{ env.AUTOPKG_OVERRIDES_REPO }}
34
+
35
+ - name: Create repos cache key
36
+ id: cache_key
37
+ shell: bash
38
+ env:
39
+ GH_TOKEN: ${{ github.token }}
40
+ run: |
41
+ echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
42
+
43
+ REPO_COMMIT_ARRAY=()
44
+ while IFS= read -r repo; do
45
+ if [ -n "$repo" ]; then
46
+ REPO="${repo:19}"
47
+ OWNER=$(echo "$REPO" | awk -F'/' '{print $1}')
48
+ NAME=$(echo "$REPO" | awk -F'/' '{print $2}')
49
+ REPO_API="repos/${OWNER}/${NAME}/commits?per_page=1"
50
+ REPO_COMMIT_SHA="$(gh api "$REPO_API" --jq '.[].sha')"
51
+ REPO_COMMIT_ARRAY+=("$REPO_COMMIT_SHA")
52
+ fi
53
+ done < "$AUTOPKG_OVERRIDES_REPO/repo_list.txt"
54
+
55
+ REPO_LIST_SHA=$(echo "${REPO_COMMIT_ARRAY[@]}" | sha256sum -t | awk '{ print $1 }')
56
+ echo "repo_list_sha=$REPO_LIST_SHA" >> $GITHUB_OUTPUT
57
+
58
+ - name: Cache autopkg repos
59
+ uses: actions/cache@v4
60
+ with:
61
+ enableCrossOsArchive: true
62
+ path: ${{ env.AUTOPKG_REPOS_DIR }}
63
+ key: cache-autopkg-repos-${{ steps.cache_key.outputs.repo_list_sha }}
64
+ restore-keys: |
65
+ cache-autopkg-repos-${{ steps.cache_key.outputs.repo_list_sha }}
66
+ cache-autopkg-repos-
67
+
68
+ - name: Clone autopkg repos
69
+ run: |
70
+ mkdir -p "$AUTOPKG_REPOS_DIR"
71
+ for repo in $(cat "$AUTOPKG_OVERRIDES_REPO/repo_list.txt"); do
72
+ REPO="${repo:19}"
73
+ OWNER="$(echo $REPO | awk -F'/' '{print $1}')"
74
+ NAME="$(echo $REPO | awk -F'/' '{print $2}')"
75
+ REPO_PATH="$AUTOPKG_REPOS_DIR/com.github.$OWNER.$NAME"
76
+
77
+ if [[ -d "$REPO_PATH" ]]; then
78
+ echo "Repo restored from cache, moving on"
79
+ else
80
+ echo "Repo not present, cloning"
81
+ git clone --depth=1 "$repo" "$REPO_PATH"
82
+ fi
83
+ done
84
+
85
+
86
+ run_autopkg_recipes:
87
+ name: Running autopkg recipes
88
+ runs-on: macos-13
89
+ needs: [cache_autopkg_recipe_repos]
90
+
91
+ steps:
92
+ - name: Checkout host repo
93
+ uses: actions/checkout@v4
94
+ with:
95
+ path: ${{ env.AUTOPKG_OVERRIDES_REPO }}
96
+
97
+ - uses: actions/setup-python@v5
98
+ with:
99
+ python-version: ${{ env.PYTHON_VERSION }}
100
+ cache: 'pip'
101
+ cache-dependency-path: |
102
+ **/requirements.txt
103
+
104
+ - name: Install requirements
105
+ run: |
106
+ pip install --upgrade pip
107
+ pip install -r "$AUTOPKG_OVERRIDES_REPO/requirements.txt"
108
+
109
+ - name: Cache autopkg repos
110
+ uses: actions/cache@v4
111
+ with:
112
+ enableCrossOsArchive: true
113
+ path: ${{ env.AUTOPKG_REPOS_DIR }}
114
+ key: cache-autopkg-repos-${{ needs.cache_autopkg_recipe_repos.outputs.cache_repos_sha }}
115
+ restore-keys: |
116
+ cache-autopkg-repos-${{ needs.cache_autopkg_recipe_repos.outputs.cache_repos_sha }}
117
+ cache-autopkg-repos-
118
+
119
+ - name: Cache autopkg packages
120
+ uses: actions/cache@v4
121
+ with:
122
+ enableCrossOsArchive: true
123
+ path: ${{ env.AUTOPKG_CACHE_DIR }}
124
+ key: cache-autopkg-packages-${{ needs.cache_autopkg_recipe_repos.outputs.cache_date }}
125
+ restore-keys: |
126
+ cache-autopkg-packages-${{ needs.cache_autopkg_recipe_repos.outputs.cache_date }}
127
+ cache-autopkg-packages-
128
+
129
+ - name: Configure autopkg directories
130
+ run: |
131
+ mkdir -p "$AUTOPKG_CACHE_DIR" "$AUTOPKG_REPOS_DIR"
132
+
133
+ - name: Validate autopkg directory structure
134
+ continue-on-error: true
135
+ run: |
136
+ echo "Contents of GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
137
+ ls -la "$GITHUB_WORKSPACE"
138
+
139
+ echo "Contents of AUTOPKG_OVERRIDES_REPO: $AUTOPKG_OVERRIDES_REPO"
140
+ ls -la "$AUTOPKG_OVERRIDES_REPO"
141
+
142
+ echo "Contents of AUTOPKG_CACHE_DIR: $AUTOPKG_CACHE_DIR"
143
+ ls -la "$AUTOPKG_CACHE_DIR"
144
+
145
+ echo "Contents of AUTOPKG_REPOS_DIR: $AUTOPKG_REPOS_DIR"
146
+ ls -la "$AUTOPKG_REPOS_DIR"
147
+
148
+ - uses: robinraju/release-downloader@efa4cd07bd0195e6cc65e9e30c251b49ce4d3e51 # v1.8
149
+ with:
150
+ repository: 'autopkg/autopkg'
151
+ latest: true
152
+ # tag: 'v3.0.0RC2'
153
+ fileName: '*.pkg'
154
+ out-file-path: 'downloads'
155
+
156
+ - name: Install autopkg
157
+ run: |
158
+ # sudo installer -pkg "$GITHUB_WORKSPACE"/downloads/*.pkg -target /
159
+ for PKG in $(find "$GITHUB_WORKSPACE"/downloads -name "*.pkg"); do
160
+ sudo /usr/sbin/installer -pkg "${PKG}" -target /
161
+ done
162
+
163
+ - name: Configure AutoPkg and Git
164
+ env:
165
+ AUTOPKG_OVERRIDES_PATH: '${{ github.workspace}}/${{ env.AUTOPKG_OVERRIDES_REPO }}/overrides'
166
+ AUTOPKG_REPOS_PATH: '${{ github.workspace}}/${{ env.AUTOPKG_REPOS_DIR }}'
167
+ AUTOPKG_CACHE_PATH: '${{ github.workspace}}/${{ env.AUTOPKG_CACHE_DIR }}'
168
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169
+ run: |
170
+ defaults write com.github.autopkg RECIPE_OVERRIDE_DIRS "$AUTOPKG_OVERRIDES_PATH"
171
+ defaults write com.github.autopkg RECIPE_REPO_DIR "$AUTOPKG_REPOS_PATH"
172
+ defaults write com.github.autopkg CACHE_DIR "$AUTOPKG_CACHE_PATH"
173
+ defaults write com.github.autopkg FAIL_RECIPES_WITHOUT_TRUST_INFO -bool YES
174
+ defaults write com.github.autopkg GITHUB_TOKEN "${GITHUB_TOKEN}"
175
+ defaults write com.github.autopkg jcds_mode -bool True
176
+ git config --global user.name "autopkg_runner"
177
+ git config --global user.email "autopkg_runner@githubactions.local"
178
+
179
+ - name: Add autopkg repos
180
+ run: |
181
+ for repo in $(cat "$AUTOPKG_OVERRIDES_REPO/repo_list.txt"); do
182
+ autopkg repo-add "$repo"
183
+ done
184
+
185
+ - name: Run autopkg recipe
186
+ run: |
187
+ ls -la
188
+ ls "$AUTOPKG_OVERRIDES_REPO"
189
+ echo "AUTOPKG_OVERRIDES_REPO: $AUTOPKG_OVERRIDES_REPO"
190
+ autopkg_wrapper
191
+ env:
192
+ DEBUG: ${{ github.event.inputs.debug }}
193
+ AUTOPKG_RECIPES: ${{ github.event.inputs.recipes }}
194
+ AUTOPKG_OVERRIDES_REPO_PATH: ${{ env.AUTOPKG_OVERRIDES_REPO }}
@@ -0,0 +1,22 @@
1
+ Identifier: local.pkg.Google_Chrome
2
+ Input:
3
+ DOWNLOAD_URL: https://dl.google.com/dl/chrome/mac/universal/stable/gcem/GoogleChrome.pkg
4
+ NAME: Google Chrome
5
+ PKGPAYLOADNAME: GoogleChrome
6
+ SOFTWARETITLE: Google_Chrome
7
+ ParentRecipe: com.github.smithjw.pkg.Google_Chrome
8
+ ParentRecipeTrustInfo:
9
+ non_core_processors:
10
+ com.github.smithjw.processors/FriendlyPathDeleter:
11
+ git_hash: 2e4a63c08157f400040db145d8d8deb64160d192
12
+ path: /usr/local/autopkgci/repos/com.github.autopkg.smithjw-recipes/SharedProcessors/FriendlyPathDeleter.py
13
+ sha256_hash: eb9abb47f5c699c98d2cde6273782504015e52e6bde031d8e27dbfa0335139dd
14
+ parent_recipes:
15
+ com.github.smithjw.download.Google_Chrome:
16
+ git_hash: 00d83d45572ac9caf5d5743f07d01aecae17413a
17
+ path: /usr/local/autopkgci/repos/com.github.autopkg.smithjw-recipes/Google/Google_Chrome.download.recipe.yaml
18
+ sha256_hash: 0acfd4869db0778a652443e1b0927486b3ccfe75254e21c6206857c0def75f7f
19
+ com.github.smithjw.pkg.Google_Chrome:
20
+ git_hash: 849955822c69b5ef28685f47662cdd9348173d96
21
+ path: /usr/local/autopkgci/repos/com.github.autopkg.smithjw-recipes/Google/Google_Chrome.pkg.recipe.yaml
22
+ sha256_hash: f84fccf85d2d966c8b336ba6a64ebdabb79c398af087cb88f1c330d56f037380
@@ -0,0 +1,2 @@
1
+ https://github.com/autopkg/smithjw-recipes
2
+ https://github.com/hjuutilainen/autopkg-virustotalanalyzer
@@ -0,0 +1,3 @@
1
+ autopkg-wrapper==2024.7.1 \
2
+ --hash=sha256:a2b5f3f2c50b4f5b71fa5a89a0ea8af09442381b7304c7b6f4cc781d3019d5bd \
3
+ --hash=sha256:ad3046e3b3568fc50e070d4d8fe433b85a1fd54cf7e1dd5b05e2efe10d5eddd9
File without changes