chore(main): release 0.3.0 #121
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: Main CI | |
on: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
INSTALL_CLI: /tmp/chezmoi.sh | |
CHEZMOI_BIN: /tmp/bin | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up repository | |
uses: actions/checkout@v4 | |
- name: Set up 1Password CLI | |
uses: 1password/install-cli-action@v1 | |
- name: Check 1Password account | |
run: op user get --me | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
- name: Cache chezmoi | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CHEZMOI_BIN }} | |
key: chezmoi-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.chezmoiversion') }} | |
- name: Download chezmoi install script | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: curl -fsLSo $INSTALL_CLI get.chezmoi.io | |
- name: Install chezmoi | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: sh "$INSTALL_CLI" -d -b "$CHEZMOI_BIN" -t "v$(cat .chezmoiversion)" | |
- name: Add chezmoi to PATH variable | |
run: echo "$CHEZMOI_BIN" >> "$GITHUB_PATH" | |
- name: Get chezmoi version | |
run: chezmoi --version | |
- name: Apply chezmoi config | |
run: | | |
chezmoi init --apply \ | |
--no-pager --no-tty \ | |
--purge-binary --force \ | |
--exclude=encrypted \ | |
--source ${{ github.workspace }} | |
- name: Run full setup | |
run: kdf-setup.sh | |
env: | |
CHEZMOI_ARGUMENTS: --force --source ${{ github.workspace }} | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Verify the result | |
run: > | |
source kdf-setup-secrets.sh; | |
kdf-verify.sh; | |
source kdf-cleanup-secrets.sh; | |
env: | |
CHEZMOI_ARGUMENTS: --source ${{ github.workspace }} | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |