chore(deps): update nrwl/nx-set-shas action to v4.1.1 (#208) #22
Workflow file for this run
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 Nx Cloud CE Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: {} | |
jobs: | |
retag-oci-images: | |
name: Re-tag OCI images | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write # for creating OIDC tokens for signing. | |
packages: write # used to push images to `ghcr.io` if used. | |
strategy: | |
matrix: | |
include: | |
- image: ghcr.io/clementguillot/nx-cloud-ce-server | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
with: | |
fetch-depth: 0 | |
- name: Set up Skopeo | |
uses: warjiang/setup-skopeo@71776e03c10d767c04af8924fe5a67763f9b3d34 # v0.1.3 | |
with: | |
version: latest | |
- name: Extract tag and commit SHA | |
id: vars | |
run: | | |
echo "TAG=${{ github.ref_name }}" >> $GITHUB_ENV | |
SHORT_SHA=$(git rev-parse --short $GITHUB_SHA) | |
echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV | |
- name: Copy images to new tag | |
run: | | |
skopeo --version | |
echo ${{ secrets.GITHUB_TOKEN }} | skopeo login -u ${{ github.actor }} --password-stdin ghcr.io | |
skopeo copy --all \ | |
docker://${{ matrix.image }}:${{ env.SHORT_SHA }} \ | |
docker://${{ matrix.image }}:${{ env.TAG }} | |
publish-helm-charts: | |
name: Publish Helm Charts | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # for helm/chart-releaser-action to push chart release and create a release | |
packages: write # to push OCI chart package to GitHub Registry | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Setup build tools | |
uses: ./.github/actions/setup-tools | |
- name: Build Helm Chart | |
run: pnpm exec nx build apps/helm-chart | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
skip_packaging: true | |
- name: Login to GHCR | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push chart to GHCR | |
run: | | |
shopt -s nullglob | |
for pkg in .cr-release-packages/*.tgz; do | |
if [ -z "${pkg:-}" ]; then | |
break | |
fi | |
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" | |
done | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # for softprops/action-gh-release to create a release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
with: | |
fetch-depth: 0 | |
- name: Create Release | |
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 | |
with: | |
generate_release_notes: true | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |