Skip to content

Commit

Permalink
Add expiration
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Morales <[email protected]>
  • Loading branch information
mauromorales committed Dec 12, 2023
1 parent 02286df commit 0c114a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/reusable-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
- name: Event PR
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "REPOSITORY=ttl.sh/framework_${{ inputs.security_profile }}" >> $GITHUB_ENV
echo "EXPIRES=1h" >> $GITHUB_ENV
- name: Event Branch
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "REPOSITORY=quay.io/kairos/framework" >> $GITHUB_ENV
echo "EXPIRES=Never" >> $GITHUB_ENV
- name: Login to Quay Registry
if: ${{ github.event_name == 'push' }}
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
Expand All @@ -40,14 +40,16 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
${{ env.REPOSITORY }}
quay.io/kairos/framework
tags: |
type=schedule
type=ref,event=branch,suffix=_${{ inputs.security_profile }}
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
labels: |
quay.expires-after=${{ env.EXPIRES }}
- name: print labels and tags
run: |
echo "lables: ${{ steps.meta.outputs.labels }}"
Expand Down

0 comments on commit 0c114a1

Please sign in to comment.