Skip to content

Commit

Permalink
Update Docker login command in clean_packages.yml workflow (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngeorger authored Apr 30, 2024
1 parent 2663472 commit 1af4705
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/clean_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
image-names: ghcr-retention-policy-test
cut-off: 2 seconds ago UTC+0
account-type: org
org-name: sredevopsorg
token: ${{ github.token }}
skip-tags: ${{ steps.image-version.outputs.image-versions }}

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ on:
release:
types: [published, edited]

permissions:
contents: write
pull-requests: write
actions: write




jobs:
tag-v1:
name: Tag v1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update tag
run: |
major_tag="$(python .github/get_version.py "${GITHUB_REF}" major)"
Expand All @@ -18,4 +26,4 @@ jobs:
git tag $minor_tag
git push origin HEAD:refs/heads/master --tags --force
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 22 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
push:
branches:
- main
permissions:
contents: read
pull-requests: write
issues: write
id-token: write


jobs:
linting:
Expand All @@ -26,7 +32,8 @@ jobs:
source .venv/bin/activate
pip install pre-commit
if: steps.cache.outputs.cache-hit != 'true'
- run: |
- continue-on-error: true
run: |
source .venv/bin/activate
pre-commit run --all-files
Expand All @@ -48,20 +55,25 @@ jobs:
~/.local
.venv
key: ${{ hashFiles('**/poetry.lock') }}-1
- name: manual poetry install
continue-on-error: true
id: install-poetry
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
sudo pipx ensurepath || true
pipx install poetry
# - name: manual poetry install
# continue-on-error: true
# id: install-poetry
# run: |
# python3 -m pip install --user pipx
# python3 -m pipx ensurepath
# sudo pipx ensurepath || true
# pipx install poetry

- uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true


- name: install dependencies
id: install-deps
continue-on-error: true
run: |
poetry config virtualenvs.create true
source $HOME/.poetry/env
poetry install --no-interaction --no-root
- run: poetry install --no-interaction --no-root
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[![release](https://img.shields.io/github/v/release/sredevopsorg/container-retention-policy)](https://github.com/sredevopsorg/container-retention-policy/releases/latest)
[![coverage](https://codecov.io/gh/snok/drf-openapi-tester/branch/master/graph/badge.svg)](https://codecov.io/gh/sredevopsorg/container-retention-policy)

# 📘 GHCR Container Retention Policy (Forked from @snok )
# 📘 GHCR Container Retention Policy (Forked)

This is a work from [@snok](https://github.com/snok), forked for analysis and possible improvements.

A GitHub Action for deleting old image versions from the GitHub container registry.

Expand Down Expand Up @@ -32,7 +34,7 @@ To use the action, simply add it to your GitHub workflow, like this:
org-name: sredevopsorg
keep-at-least: 3
skip-tags: latest
token: ${{ secrets.PAT }}
token: ${{ secrets.GHCR_TOKEN }}
```
Notice image-names supports wildcards.
Expand Down

0 comments on commit 1af4705

Please sign in to comment.