Skip to content

Commit

Permalink
ci: merge delivery jobs to reduce bill
Browse files Browse the repository at this point in the history
  • Loading branch information
import-benjamin authored Dec 30, 2023
1 parent dc21912 commit ccdd1de
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ name: Delivery

jobs:

build:
release:
permissions:
contents: read
contents: write
pull-requests: write
packages: write

runs-on: ubuntu-22.04
Expand All @@ -34,35 +35,10 @@ jobs:
# cache-from: type=gha
# cache-to: type=gha,mode=max

release:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-22.04
outputs:
created: ${{ steps.release.outputs.release_created }}
tag: ${{ steps.release.outputs.tag_name }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release

promote:
permissions:
contents: read
packages: write

needs: [release, build]
runs-on: ubuntu-22.04

if: ${{ needs.release.outputs.created }}

steps:
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- run: skopeo copy docker://ghcr.io/${REPOSITORY@L}:main docker://ghcr.io/${REPOSITORY@L}:${{ needs.release.outputs.tag }}
if: ${{ steps.release.outputs.created }}
env:
REPOSITORY: ${{ github.repository }}

0 comments on commit ccdd1de

Please sign in to comment.