nmk/login.sh supports additional parameters passing #42
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 and Upload | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
build_and_upload: | |
runs-on: ubuntu-latest | |
name: Build dotfiles tarball | |
# Add "id-token" with the intended permissions. | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build tar file | |
run: | | |
set -ex | |
rm -rf dist && mkdir dist | |
branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
python3 etc/build.py --no-upload --branch "$branch" --copy-to dist | |
- name: Final artifact summary | |
run: | | |
set -e | |
( | |
echo '## Artifact files' | |
echo '```sh' | |
ls -lh dist | |
echo '```' | |
) >> "$GITHUB_STEP_SUMMARY" | |
- name: "Authenticate to google cloud" | |
id: 'auth' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
workload_identity_provider: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: ${{ vars.SERVICE_ACCOUNT }} | |
- name: 'Upload to public bucket' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: dist | |
parent: false | |
gzip: true | |
destination: 'nmk.nuimk.com' | |
process_gcloudignore: false |