Skip to content

Commit 50811a7

Browse files
Merge pull request #2773 from blacklanternsecurity/better-install-deps
Fix docker publishing?
2 parents 7fc8731 + 6237e4d commit 50811a7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/tests.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,43 +84,63 @@ jobs:
8484
password: ${{ secrets.PYPI_API_TOKEN }}
8585
- name: Get BBOT version
8686
id: version
87-
run: echo "BBOT_VERSION=$(poetry version | cut -d' ' -f2)" >> $GITHUB_OUTPUT
87+
run: |
88+
FULL_VERSION=$(poetry version | cut -d' ' -f2)
89+
echo "BBOT_VERSION=$FULL_VERSION" >> $GITHUB_OUTPUT
90+
# Extract major.minor (e.g., 2.7 from 2.7.1)
91+
MAJOR_MINOR=$(echo "$FULL_VERSION" | cut -d'.' -f1-2)
92+
echo "BBOT_VERSION_MAJOR_MINOR=$MAJOR_MINOR" >> $GITHUB_OUTPUT
93+
# Extract major (e.g., 2 from 2.7.1)
94+
MAJOR=$(echo "$FULL_VERSION" | cut -d'.' -f1)
95+
echo "BBOT_VERSION_MAJOR=$MAJOR" >> $GITHUB_OUTPUT
8896
- name: Publish to Docker Hub (dev)
8997
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
9098
uses: docker/build-push-action@v6
9199
with:
92100
push: true
101+
context: .
93102
tags: |
94103
blacklanternsecurity/bbot:latest
95104
blacklanternsecurity/bbot:dev
96105
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}
106+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}
107+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}
97108
- name: Publish to Docker Hub (stable)
98109
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
99110
uses: docker/build-push-action@v6
100111
with:
101112
push: true
113+
context: .
102114
tags: |
103115
blacklanternsecurity/bbot:stable
104116
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}
117+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}
118+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}
105119
- name: Publish Full Docker Image to Docker Hub (dev)
106120
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
107121
uses: docker/build-push-action@v6
108122
with:
109123
push: true
110124
file: Dockerfile.full
125+
context: .
111126
tags: |
112127
blacklanternsecurity/bbot:latest-full
113128
blacklanternsecurity/bbot:dev-full
114129
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}-full
130+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}-full
131+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}-full
115132
- name: Publish Full Docker Image to Docker Hub (stable)
116133
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
117134
uses: docker/build-push-action@v6
118135
with:
119136
push: true
120137
file: Dockerfile.full
138+
context: .
121139
tags: |
122140
blacklanternsecurity/bbot:stable-full
123141
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION }}-full
142+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR_MINOR }}-full
143+
blacklanternsecurity/bbot:${{ steps.version.outputs.BBOT_VERSION_MAJOR }}-full
124144
- name: Docker Hub Description
125145
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
126146
uses: peter-evans/dockerhub-description@v5

0 commit comments

Comments
 (0)