Skip to content

Commit

Permalink
cd fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdud007 committed Aug 13, 2024
1 parent 23a4e5e commit c5fe443
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,36 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/hdp-cairo-dev
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Log in to Docker Hub
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create remote builder certificates
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
echo "${{ secrets.BUILDKIT_CA_PEM }}" > ${{ github.workspace }}/client-ca.pem
echo "${{ secrets.BUILDKIT_CERT_PEM }}" > ${{ github.workspace }}/client-cert.pem
echo "${{ secrets.BUILDKIT_KEY_PEM }}" > ${{ github.workspace }}/client-key.pem
- name: Set up Docker Buildx
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/setup-buildx-action@v3
with:
driver: remote
Expand All @@ -41,6 +45,7 @@ jobs:
cleanup: true

- name: Build and push Docker image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/build-push-action@v5
with:
file: environment.dockerfile
Expand All @@ -62,5 +67,13 @@ jobs:
run: |
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
- name: Check PyPI package (dry run)
run: |
twine check dist/*
echo "Package check completed. In a real publish, the package would be uploaded to PyPI."
- name: Publish package to PyPI
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def run(self):
name="hdp-cairo-dev",
long_description=long_description,
long_description_content_type="text/markdown",
version="0.0.6",
version="0.0.7",
packages=[
"tools",
"contract_bootloader",
Expand Down

0 comments on commit c5fe443

Please sign in to comment.