File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Set up Docker publish"
2+ description : >-
3+ Set up QEMU + Docker Buildx and authenticate to Docker Hub for multi-arch
4+ image builds. Centralizes the QEMU/Buildx/login trio used by release,
5+ preview, and stable workflows.
6+
7+ inputs :
8+ dockerhub-username :
9+ description : " Docker Hub username (pass from secrets)"
10+ required : true
11+ dockerhub-token :
12+ description : " Docker Hub token/password (pass from secrets)"
13+ required : true
14+
15+ runs :
16+ using : " composite"
17+ steps :
18+ - uses : docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
19+ - uses : docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
20+ - uses : docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
21+ with :
22+ username : ${{ inputs.dockerhub-username }}
23+ password : ${{ inputs.dockerhub-token }}
Original file line number Diff line number Diff line change 1+ name : " Set up Socket Firewall (free)"
2+ description : >-
3+ Set up the requested language toolchain and install Socket Firewall (free
4+ edition) so subsequent steps can run package-manager commands wrapped with
5+ `sfw`. Free/anonymous mode -- no API token, safe on untrusted/Dependabot PRs.
6+
7+ inputs :
8+ python :
9+ description : " Set up Python 3.12"
10+ default : " false"
11+ node :
12+ description : " Set up Node 20 (needed for npm-wrapped checks)"
13+ default : " false"
14+ uv :
15+ description : " Install uv (implies Python)"
16+ default : " false"
17+
18+ runs :
19+ using : " composite"
20+ steps :
21+ - if : ${{ inputs.python == 'true' || inputs.uv == 'true' }}
22+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
23+ with :
24+ python-version : " 3.12"
25+
26+ - if : ${{ inputs.node == 'true' }}
27+ uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
28+ with :
29+ node-version : " 20"
30+
31+ # Official Socket setup action. Wires up sfw routing correctly.
32+ - uses : socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
33+ with :
34+ mode : firewall-free
35+
36+ - if : ${{ inputs.uv == 'true' }}
37+ name : Install uv
38+ shell : bash
39+ run : python -m pip install --upgrade pip uv
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ updates:
3838
3939 # GitHub Actions used in workflows
4040 - package-ecosystem : " github-actions"
41- directory : " /"
41+ directories :
42+ - " /"
43+ - " /.github/actions/*"
4244 schedule :
4345 interval : " weekly"
4446 open-pull-requests-limit : 2
Original file line number Diff line number Diff line change 9494 fetch-depth : 1
9595 persist-credentials : false
9696
97- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
97+ - uses : ./.github/ actions/setup-sfw
9898 with :
99- python-version : " 3.12"
100-
101- - uses : socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
102- with :
103- mode : firewall-free
104-
105- - name : Install uv
106- run : python -m pip install --upgrade pip uv
99+ uv : " true"
107100
108101 - name : Sync project through Socket Firewall
109102 # `sfw uv sync` is the intended way to route uv through Socket Firewall
@@ -138,13 +131,9 @@ jobs:
138131 fetch-depth : 1
139132 persist-credentials : false
140133
141- - uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
134+ - uses : ./.github/ actions/setup-sfw
142135 with :
143- node-version : " 20"
144-
145- - uses : socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
146- with :
147- mode : firewall-free
136+ node : " true"
148137
149138 - name : Install fixture through Socket Firewall
150139 working-directory : tests/e2e/fixtures/simple-npm
@@ -161,13 +150,9 @@ jobs:
161150 fetch-depth : 1
162151 persist-credentials : false
163152
164- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
165- with :
166- python-version : " 3.12"
167-
168- - uses : socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
153+ - uses : ./.github/actions/setup-sfw
169154 with :
170- mode : firewall-free
155+ python : " true "
171156
172157 - name : Install fixture through Socket Firewall
173158 working-directory : tests/e2e/fixtures/simple-pypi
Original file line number Diff line number Diff line change @@ -28,17 +28,11 @@ jobs:
2828 fi
2929 echo "Version ${INPUT_VERSION} found on PyPI - proceeding with release"
3030
31- - name : Set up QEMU
32- uses : docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
33-
34- - name : Set up Docker Buildx
35- uses : docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
36-
37- - name : Login to Docker Hub with Organization Token
38- uses : docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
31+ - name : Set up Docker publishing
32+ uses : ./.github/actions/setup-docker-publish
3933 with :
40- username : ${{ secrets.DOCKERHUB_USERNAME }}
41- password : ${{ secrets.DOCKERHUB_TOKEN }}
34+ dockerhub- username : ${{ secrets.DOCKERHUB_USERNAME }}
35+ dockerhub-token : ${{ secrets.DOCKERHUB_TOKEN }}
4236
4337 - name : Build & Push Stable Docker
4438 uses : docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
Original file line number Diff line number Diff line change @@ -141,18 +141,12 @@ jobs:
141141 echo "success=false" >> $GITHUB_OUTPUT
142142 exit 1
143143
144- - name : Set up QEMU
145- uses : docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
146-
147- - name : Set up Docker Buildx
148- uses : docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
149-
150- - name : Login to Docker Hub with Organization Token
144+ - name : Set up Docker publishing
151145 if : steps.verify_package.outputs.success == 'true'
152- uses : docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
146+ uses : ./.github/actions/setup-docker-publish
153147 with :
154- username : ${{ secrets.DOCKERHUB_USERNAME }}
155- password : ${{ secrets.DOCKERHUB_TOKEN }}
148+ dockerhub- username : ${{ secrets.DOCKERHUB_USERNAME }}
149+ dockerhub-token : ${{ secrets.DOCKERHUB_TOKEN }}
156150
157151 - name : Build & Push Docker Preview
158152 if : steps.verify_package.outputs.success == 'true'
Original file line number Diff line number Diff line change @@ -68,17 +68,11 @@ jobs:
6868 if : steps.version_check.outputs.pypi_exists != 'true'
6969 uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
7070
71- - name : Set up QEMU
72- uses : docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
73-
74- - name : Set up Docker Buildx
75- uses : docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
76-
77- - name : Login to Docker Hub with Organization Token
78- uses : docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
71+ - name : Set up Docker publishing
72+ uses : ./.github/actions/setup-docker-publish
7973 with :
80- username : ${{ secrets.DOCKERHUB_USERNAME }}
81- password : ${{ secrets.DOCKERHUB_TOKEN }}
74+ dockerhub- username : ${{ secrets.DOCKERHUB_USERNAME }}
75+ dockerhub-token : ${{ secrets.DOCKERHUB_TOKEN }}
8276
8377 - name : Verify package is installable
8478 id : verify_package
You can’t perform that action at this time.
0 commit comments