• Mask dynamic secrets from GitHub Action's logs

    2 min read

    github action mask secret runtime

    GitHub will mask all the configured secrets from it's logs, but sometimes some secrets are retrieves from different sources (like AWS credentials, secrets fetched from other sources...) We don't want them to be stored as clear text in the GiHub's Actions logs, so we'll have to use add-mask to prevent it

    10/01/2023

    Read more...
  • Adding a comment on a Pull Request using Github Actions

    2 min read

    github action add comment PR

    As part of a CI/CD pipeline involving GitHub Actions we might want to be able to add a comment to the PR to notify the user about something:

    name: demo_add_comment_pr
    on:
      pull_request:
        types: [opened, ready_for_review]
      push:
        branches:
          - '**'
          - '!main'
        paths:    
          - cluster-resources/**
          - tests/**
      workflow_dispatch:
    
    (...)
    

    12/12/2022

    Read more...
  • Publish a helm chart using github actions and github pages

    2 min read

    helm release github actions github pages

    Having a helm chart released (via an index.yaml) is a convenient way of using it. Combining github actions with github pages we can do it in a serverless fashion

    31/10/2022

    Read more...
  • Github actions: Share environment variables across steps

    1 min read

    github share variable environment variable

    If we want to share data between steps (on a Github action) it's just not enough to export a variable like this:

    export VARIABLE_NAME
    

    05/10/2021

    Read more...
  • go get: Add a module from a private GitHub repository

    2 min read

    GitHub private repository go get

    If you try to add a golang module that is on a private repository you'll get an error similar to this:

    $ go get github.com/pet2cattle/golang-demo
    go: downloading github.com/pet2cattle/golang-demo v0.0.0-20220925191817-0b4b7026fa7f
    go: github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: verifying module: github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: reading https://sum.golang.org/lookup/github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: 404 Not Found
            server response:
            not found: github.com/pet2cattle/golang-demo@v0.0.0-20220925191817-0b4b7026fa7f: invalid version: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/75d68059a7355b978972dea177e930262ce90abe410680b8db8a45a587e02c26: exit status 128:
                    fatal: could not read Username for 'https://github.com': terminal prompts disabled
            Confirm the import path was entered correctly.
            If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
    

    26/09/2022

    Read more...

More recent...