Skip to content

Commit

Permalink
Update and rename publish-dockerhub.yml to publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishang authored Feb 10, 2023
1 parent 3a71c08 commit 4e4a10f
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/publish-dockerhub.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: DockerHub Release
on:
release:
types: [published, edited]
env:
DOCKER_BUILDKIT: 1

jobs:
release-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: tag name
run: echo $GITHUB_REF_NAME

- uses: docker/login-action@v2
with:
username: rishang
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: build
run: |
docker build -t aws-oidc-broker .
docker tag aws-oidc-broker rishang/aws-oidc-broker:$GITHUB_REF_NAME
docker tag aws-oidc-broker rishang/aws-oidc-broker:latest
- name: push
run: |
docker push rishang/aws-oidc-broker:$GITHUB_REF_NAME
docker push rishang/aws-oidc-broker:latest
release-pip:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3

- name: tag name
run: echo $GITHUB_REF_NAME

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Config Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
python -m pip install --upgrade pip
poetry install
- name: Build
run: |
poetry build
- name: publish
run: |
poetry publish -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }}

0 comments on commit 4e4a10f

Please sign in to comment.