ci: dont use deprectaed set-output #16
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: Chart | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
permissions: | |
packages: write | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Get chart version | |
run: | | |
CHART_VERSION=$(cat chart/Chart.yaml | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+$") | |
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_ENV | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check if chart exists | |
id: chartExists | |
run: | | |
set +e | |
docker manifest inspect ghcr.io/henrywhitaker3/prompage-helm:${{ env.CHART_VERSION }} | |
rc=$? | |
set -e | |
if [ $rc -eq 0 ]; then | |
echo "CHART_EXISTS=yes" >> $GITHUB_OUTPUT | |
else | |
echo "CHART_EXISTS=no" >> $GITHUB_OUTPUT | |
fi | |
- name: Push chart | |
if: steps.chartExists.outputs.CHART_EXISTS == 'no' | |
uses: appany/[email protected] | |
with: | |
name: prompage-helm | |
repository: henrywhitaker3 | |
tag: ${{ env.CHART_VERSION }} | |
path: chart | |
registry: ghcr.io | |
registry_username: ${{ github.actor }} | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
update_dependencies: 'true' |