Hopefully fix the example build. #29
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: Build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*.*.*" | |
env: | |
GIT_TAG_NAME: ${{ github.ref_type == 'tag' && github.ref_name || '' }} | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout elm-fontawesome-generator repository. | |
uses: actions/checkout@v4 | |
- name: Setup buildx. | |
uses: docker/setup-buildx-action@v2 | |
- name: Build library. | |
uses: docker/bake-action@v4 | |
env: | |
ELM_FONTAWESOME_VERSION: ${{ env.GIT_TAG_NAME }} | |
- name: Ensure example builds. | |
uses: docker/bake-action@v4 | |
with: | |
targets: example | |
- name: Checkout elm-fontawesome repository. | |
uses: actions/checkout@v4 | |
with: | |
repository: "lattyware/elm-fontawesome" | |
ssh-key: ${{ secrets.LIB_DEPLOY_KEY }} | |
path: "lib" | |
- name: Replace elm-fontawesome. | |
working-directory: ./lib | |
run: | | |
rm -rf $(git ls-tree --full-tree --name-only HEAD) | |
cp -RT ../dist/lib . | |
- name: Push to elm-fontawesome. | |
working-directory: ./lib | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
if git diff --exit-code; then | |
echo "No changes to commit." | |
else | |
git add -A | |
git commit -m "Generated by ${{ github.repository }}" -m "Commit: ${{ env.GIT_TAG_NAME || github.sha }}" | |
git push | |
fi | |
if [[ "${GIT_TAG_NAME}" != "" ]]; then | |
git tag -am "${GIT_TAG_NAME} Release" "${GIT_TAG_NAME}" | |
git push origin "${GIT_TAG_NAME}" | |
fi |