Update mcr.microsoft.com/devcontainers/ruby Docker tag to v4 #2213
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: read-all | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - semver | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5 | |
| with: | |
| path: | | |
| .esphome | |
| key: ${{ runner.os }}-${{ hashFiles('src/*') }}-${{ hashFiles('childrensclock.yaml') }} | |
| - uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 # v0.3 | |
| with: | |
| runCmd: rake test | |
| - uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 # v0.3 | |
| with: | |
| runCmd: rake build | |
| env: | | |
| VERSION=${{ needs.semver.outputs.semantic_version}} | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: firmware-factory.bin | |
| path: .esphome/build/childrensclock/.pioenvs/childrensclock/firmware.factory.bin | |
| semver: | |
| name: Generate a semantic version number | |
| runs-on: ubuntu-latest | |
| outputs: | |
| semantic_version: ${{ steps.semver.outputs.semantic_version }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: "0" | |
| - id: semver | |
| uses: lukaszraczylo/semver-generator@5f205e98567f537739f06c0254705ea2414cfaec # v1.16.5 | |
| with: | |
| config_file: .github/semver.yaml | |
| repository_local: true | |
| release-binaries: | |
| name: Release | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| - semver | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: firmware-factory.bin | |
| - uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # tag=v1.2.1 | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: v${{ needs.semver.outputs.semantic_version}} | |
| prerelease: false | |
| title: v${{ needs.semver.outputs.semantic_version}} | |
| files: "firmware-factory.bin" |