Skip to content

Commit

Permalink
embedded docker login into the action (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chizkiyahu authored Dec 30, 2024
1 parent c75a8df commit 9288a8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ delete all / untagged ghcr containers in a repository

## Delete all containers from repository without tags except untagged multiplatform packages
```yaml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry with PAT_TOKEN
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_TOKEN }}
- name: Delete all containers from repository without tags
uses: Chizkiyahu/delete-untagged-ghcr-action@v5
with:
Expand Down Expand Up @@ -141,14 +133,6 @@ delete all / untagged ghcr containers in a repository
## Delete all containers from package without tags except untagged multiplatform packages
```yaml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry with PAT_TOKEN
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Delete all containers from package without tags
uses: Chizkiyahu/delete-untagged-ghcr-action@v5
with:
Expand Down
10 changes: 9 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ runs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- name: Install Python dependencies
shell: bash
run: pip install -r ${{ github.action_path }}/requirements.txt
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry with PAT_TOKEN
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ inputs.token }}
- name: Run action
id: delete-untagged-ghcr-action
shell: bash
Expand Down

0 comments on commit 9288a8b

Please sign in to comment.