From 9288a8bc88c02bcf231a25bf080ec3e6c6e0f555 Mon Sep 17 00:00:00 2001 From: Chizkiyahu Raful <37312901+Chizkiyahu@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:13:26 +0200 Subject: [PATCH] embedded docker login into the action (#50) --- README.md | 16 ---------------- action.yml | 10 +++++++++- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5430c03..c8e9c17 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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: diff --git a/action.yml b/action.yml index a28e716..23f5b2a 100644 --- a/action.yml +++ b/action.yml @@ -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