mirror of
https://github.com/docker/build-push-action.git
synced 2024-12-26 00:32:08 -05:00
Merge pull request #170 from crazy-max/fix-complete-workflow
Fix complete workflow
This commit is contained in:
commit
2fb322285c
1 changed files with 13 additions and 5 deletions
18
README.md
18
README.md
|
@ -457,6 +457,14 @@ might want to use:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Repo metadata
|
||||||
|
id: repo
|
||||||
|
uses: actions/github-script@v3
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const repo = await github.repos.get(context.repo)
|
||||||
|
return repo.data
|
||||||
-
|
-
|
||||||
name: Prepare
|
name: Prepare
|
||||||
id: prep
|
id: prep
|
||||||
|
@ -510,14 +518,14 @@ might want to use:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.title=${{ github.event.repository.name }}
|
org.opencontainers.image.title=${{ fromJson(steps.repo.outputs.result).name }}
|
||||||
org.opencontainers.image.description=${{ github.event.repository.description }}
|
org.opencontainers.image.description=${{ fromJson(steps.repo.outputs.result).description }}
|
||||||
org.opencontainers.image.url=${{ github.event.repository.html_url }}
|
org.opencontainers.image.url=${{ fromJson(steps.repo.outputs.result).html_url }}
|
||||||
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
|
org.opencontainers.image.source=${{ fromJson(steps.repo.outputs.result).clone_url }}
|
||||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
|
org.opencontainers.image.licenses=${{ fromJson(steps.repo.outputs.result).license.spdx_id }}
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue