Git Product home page Git Product logo

charming-actions's Introduction

Charming Actions Collection

The Charming Actions Collection is a set of actions useful for Juju charm developers who want to introduce automation into their release workflow. The collection currently consists of the following actions:

Usage

⚠️ Prerequisites

To use these actions, start by adding a repository secret to your Github repository. In the example below, it's called CHARMCRAFT_TOKEN, but can be anything you want. See https://juju.is/docs/sdk/remote-env-auth for more information on how to generate the appropriate credentials. GITHUB_TOKEN does not need to be explicitly added to the repository secrets as GitHub Actions will generate a context-bound token for each workflow execution.

The below snippet illustrates how to use the actions of the collection in a PR workflow, as well as a push workflow:

name: Pull Request

on:
  pull_request:
    branches:
      - main

jobs:
  build:
    name: Release to edge
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Check libraries
        uses: canonical/charming-actions/[email protected]
        with:
          credentials: "${{ secrets.CHARMHUB_TOKEN }}"
          github-token: "${{ secrets.GITHUB_TOKEN }}"
name: Release

on:
  push:
    branches:
      - main

jobs:
  build:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Release any bumped charm libs
        uses: canonical/charming-actions/[email protected]
        with:
          credentials: "${{ secrets.CHARMHUB_TOKEN }}"
          github-token: "${{ secrets.GITHUB_TOKEN }}"
      - name: Select charmhub channel
        uses: canonical/charming-actions/[email protected]
        id: channel
      - name: Upload charm to charmhub
        uses: canonical/charming-actions/[email protected]
        with:
          credentials: "${{ secrets.CHARMHUB_TOKEN }}"
          github-token: "${{ secrets.GITHUB_TOKEN }}"
          upload-image: "true"
          channel: "${{ steps.channel.outputs.name }}"

Development

To be able to contribute to this repository, you first need to make sure you have npm and nodejs installed in your local development environment. This installation varies depending on the OS and distribution you are using. For more detailed instructions, see the official NodeJS page.

Once that is done, start by cloning the repository:

$ git clone [email protected]:canonical/charming-actions.git
$ cd charming-actions

Then install the required packages:

$ npm install

Finally, build the actions by running:

$ npm run build

Tests

Run unit tests:

$ npm test

charming-actions's People

Contributors

simskij avatar sanchezfdezjavier avatar knkski avatar renovate[bot] avatar ca-scribner avatar beliaev-maksim avatar jnsgruk avatar merkata avatar lucabello avatar claudiubelu avatar mthaddon avatar sudeephb avatar pietropasotti avatar nsklikas avatar agathanatasha avatar sed-i avatar kian99 avatar gruyaume avatar dnplas avatar taurus-forever avatar addyess avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.