-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: merge delivery jobs to reduce bill
- Loading branch information
1 parent
dc21912
commit ccdd1de
Showing
1 changed file
with
4 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,10 @@ name: Delivery | |
|
||
jobs: | ||
|
||
build: | ||
release: | ||
permissions: | ||
contents: read | ||
contents: write | ||
pull-requests: write | ||
packages: write | ||
|
||
runs-on: ubuntu-22.04 | ||
|
@@ -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 }} |