Skip to content

Commit

Permalink
chore(template): sync with ahmadnassri/template-node-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Oct 22, 2021
1 parent 3b3fd47 commit 77b7781
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ jobs:
outputs:
published: ${{ steps.release.outputs.published }}
version: ${{ steps.release.outputs.release-version }}
version-major: ${{ steps.release.outputs.release-version-major }}
version-minor: ${{ steps.release.outputs.release-version-minor }}

steps:
- uses: actions/[email protected]
Expand Down Expand Up @@ -208,10 +210,9 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}

- id: hub
- id: meta
run: |
echo "::set-output name=name::$(basename "${GITHUB_REPOSITORY/node-//}")"
echo "::set-output name=version::${{ needs.release.outputs.version }}"
echo "::set-output name=name::${{ github.repository_owner }}/$(basename "${GITHUB_REPOSITORY/node-//}")"
# publish
- uses: docker/build-push-action@v2
Expand All @@ -220,14 +221,18 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: |
${{ github.repository_owner }}/${{ steps.hub.outputs.name }}:latest
${{ github.repository_owner }}/${{ steps.hub.outputs.name }}:${{ steps.hub.outputs.version }}
ghcr.io/${{ github.repository_owner }}/${{ steps.hub.outputs.name }}:latest
ghcr.io/${{ github.repository_owner }}/${{ steps.hub.outputs.name }}:${{ steps.hub.outputs.version }}
${{ steps.meta.outputs.name }}:latest
${{ steps.meta.outputs.name }}:v${{ needs.release.outputs.version-major }}.${{ needs.release.outputs.version-minor }}
${{ steps.meta.outputs.name }}:v${{ needs.release.outputs.version-major }}
${{ steps.meta.outputs.name }}:v${{ needs.release.outputs.version }}
ghcr.io/${{ steps.meta.outputs.name }}:latest
ghcr.io/${{ steps.meta.outputs.name }}:v${{ needs.release.outputs.version-major }}.${{ needs.release.outputs.version-minor }}
ghcr.io/${{ steps.meta.outputs.name }}:v${{ needs.release.outputs.version-major }}
ghcr.io/${{ steps.meta.outputs.name }}:v${{ needs.release.outputs.version }}
labels: |
org.opencontainers.image.title=${{ steps.hub.outputs.name }}
org.opencontainers.image.title=${{ steps.meta.outputs.name }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.version=${{ steps.hub.outputs.version }}
org.opencontainers.image.version=${{ needs.release.outputs.version }}
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.revision=${{ github.sha }}
Expand Down

0 comments on commit 77b7781

Please sign in to comment.