Skip to content

Commit 5e906a7

Browse files
Gauthier Le PapeSeptimus4
authored andcommitted
Fix docker build and push workflow
Fix docker build and push workflow by adding docker buildx setup
1 parent ceb3342 commit 5e906a7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
env:
88
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ toLower(github.repository) }}
910

1011
jobs:
1112
build-and-push:
@@ -18,15 +19,11 @@ jobs:
1819
- name: Checkout repository
1920
uses: actions/checkout@v4
2021

21-
- name: Derive lowercase image name
22-
run: |
23-
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV"
24-
2522
- name: Extract version from pyproject.toml
2623
id: version
2724
run: |
28-
VERSION=$(grep -E "^[[:space:]]*version[[:space:]]*=" pyproject.toml | head -n1 | sed -E "s/.*=[[:space:]]*['\"]([^'\"]+)['\"].*/\1/")
29-
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
25+
VERSION=$(grep -E '^version\s*=' pyproject.toml | awk -F'"' '{print $2}')
26+
echo "version=$VERSION" >> $GITHUB_OUTPUT
3027
3128
- name: Log in to GHCR
3229
uses: docker/login-action@v3
@@ -35,6 +32,9 @@ jobs:
3532
username: ${{ github.actor }}
3633
password: ${{ secrets.GITHUB_TOKEN }}
3734

35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
3838
- name: Build and push Docker image
3939
uses: docker/build-push-action@v5
4040
with:
@@ -49,6 +49,6 @@ jobs:
4949
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
5050
org.opencontainers.image.description=Creates date-based wordlists that can be used for penetration testing, QA fixtures, or any workflow that needs exhaustive date coverage.
5151
org.opencontainers.image.version=${{ steps.version.outputs.version }}
52-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
52+
org.opencontainers.image.source=${{ github.repositoryUrl }}
5353
org.opencontainers.image.revision=${{ github.sha }}
54-
org.opencontainers.image.licenses=LGPL-3.0-or-later
54+
org.opencontainers.image.licenses=GNU Lesser General Public License v3.0

0 commit comments

Comments
 (0)