Skip to content

Commit 07b9c59

Browse files
committed
Fix container workflow: build wheel before Docker, update deprecated syntax
- Replace removed ::set-output with GITHUB_OUTPUT - Add fetch-depth: 0 so lsst-versions can read git tags when building wheel - Add Python + build step to produce dist/*.whl before docker build - Update docker/login-action v1 -> v3 Generated with AI Co-Authored-By: SLAC AI
1 parent ad537bd commit 07b9c59

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/build_sync_container.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,28 @@ jobs:
2121
|| startsWith(github.head_ref, 'tickets/')
2222
2323
steps:
24-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
2527

2628
- name: Define the Docker tag
2729
id: vars
28-
run: echo ::set-output name=tag::$(script/docker-tag.sh "$GITHUB_REF")
30+
run: echo "tag=$(script/docker-tag.sh "$GITHUB_REF")" >> "$GITHUB_OUTPUT"
2931

3032
- name: Print the tag
3133
id: print
3234
run: echo ${{ steps.vars.outputs.tag }}
3335

36+
- name: Set up Python
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: "3.12"
40+
41+
- name: Build wheel
42+
run: |
43+
pip install --upgrade build
44+
python -m build --wheel --skip-dependency-check
45+
3446
- name: Set up Docker Buildx
3547
uses: docker/setup-buildx-action@v3
3648

@@ -43,7 +55,7 @@ jobs:
4355
${{ runner.os }}-buildx-
4456

4557
- name: Log in to Docker Hub
46-
uses: docker/login-action@v1
58+
uses: docker/login-action@v3
4759
with:
4860
username: ${{ secrets.DOCKER_HUB_USERNAME }}
4961
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)