Bump softprops/action-gh-release in the all-dependencies group #75
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
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
defaults: | |
run: | |
working-directory: stolostron/magic-mirror | |
jobs: | |
publish: | |
name: publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
path: stolostron/magic-mirror | |
- name: verify package and helm chart version | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
package_version="v$(jq -r '.version' package.json)" | |
chart_version="$(yq e '.appVersion' helm/Chart.yaml)" | |
echo "package.json version: ${package_version}" | |
echo "Helm chart version : ${chart_version}" | |
echo "Tagged version : ${{ github.ref_name }}" | |
[[ "${package_version}" == "${{ github.ref_name }}" ]] && | |
[[ "${chart_version}" == "${{ github.ref_name }}" ]] | |
- name: publish image | |
run: | | |
IMAGE_TAG="latest" | |
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then | |
IMAGE_TAG="${{ github.ref_name }}" | |
fi | |
docker build -t quay.io/${{ github.repository }}:${IMAGE_TAG} -f Dockerfile . | |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin | |
docker push quay.io/${{ github.repository }}:${IMAGE_TAG} | |
- name: publish release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: softprops/[email protected] | |
with: | |
generate_release_notes: true | |
draft: true | |
prerelease: false | |
body: "## magic-mirror ${{ github.ref_name }}\nThe released image is quay.io/${{ github.repository }}:${{ github.ref_name}}\n" |