diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..367994e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a bug report to help us improve +title: "" +labels: ["bug"] +assignees: '' +--- + +#### Describe the bug + + +#### To Reproduce + + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +#### Expected behavior + + +#### Screenshots + + +#### Logs + + +#### Environment + +- ROCK version (if relevant): +- Juju version (output from `juju --version`): +- Cloud Environment: +- Kubernetes version (output from `kubectl version --short`): + +#### Additional context + + diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 8bb3ad1..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Build - -on: - workflow_call: - -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - uses: canonical/craft-actions/rockcraft-pack@main - id: rockcraft - - uses: actions/upload-artifact@v4 - with: - name: rock - path: ${{ steps.rockcraft.outputs.rock }} diff --git a/.github/workflows/dependabot_pr.yaml b/.github/workflows/dependabot_pr.yaml new file mode 100644 index 0000000..528785b --- /dev/null +++ b/.github/workflows/dependabot_pr.yaml @@ -0,0 +1,12 @@ +name: "Dependabot Auto Approve and Merge" + +on: + pull_request: + +permissions: + pull-requests: write + contents: write + +jobs: + auto-merge: + uses: canonical/sdcore-github-workflows/.github/workflows/dependabot_pr.yaml@v0.0.1 diff --git a/.github/workflows/issues.yaml b/.github/workflows/issues.yaml new file mode 100644 index 0000000..ba363df --- /dev/null +++ b/.github/workflows/issues.yaml @@ -0,0 +1,11 @@ +name: Sync Issues to JIRA + +on: + issues: + types: [opened, reopened, closed] + +jobs: + update: + name: Update Issue + uses: canonical/sdcore-github-workflows/.github/workflows/issues.yaml@v0.0.1 + secrets: inherit diff --git a/.github/workflows/lint-pr.yaml b/.github/workflows/lint-pr.yaml new file mode 100644 index 0000000..d54e174 --- /dev/null +++ b/.github/workflows/lint-pr.yaml @@ -0,0 +1,20 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..83f34e6 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,25 @@ +name: Main + +on: + pull_request: + branches: + - main + push: + branches: + - main + schedule: + - cron: '0 0 * * 0' + +jobs: + + build-rock: + uses: canonical/sdcore-github-workflows/.github/workflows/build-rock.yaml@v0.0.1 + + scan-rock: + needs: build-rock + uses: canonical/sdcore-github-workflows/.github/workflows/scan-rock.yaml@v0.0.1 + + publish-rock: + if: github.ref_name == 'main' + needs: scan-rock + uses: canonical/sdcore-github-workflows/.github/workflows/publish-rock.yaml@v0.0.1 diff --git a/.github/workflows/on_push.yaml b/.github/workflows/on_push.yaml deleted file mode 100644 index daab396..0000000 --- a/.github/workflows/on_push.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Push - -on: - push: - -jobs: - - build: - uses: ./.github/workflows/build.yaml - - publish: - if: github.ref_name == 'main' - needs: build - uses: ./.github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 8836991..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Publish - -on: - workflow_call: - -jobs: - - publish: - runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3.1.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Install skopeo - run: | - sudo snap install --devmode --channel edge skopeo - - name: Install yq - run: | - sudo snap install yq - - uses: actions/download-artifact@v4 - with: - name: rock - - - name: Import and push to github package - run: | - image_name="$(yq '.name' rockcraft.yaml)" - version="$(yq '.version' rockcraft.yaml)" - rock_file=$(ls *.rock | tail -n 1) - sudo skopeo \ - --insecure-policy \ - copy \ - oci-archive:"${rock_file}" \ - docker-daemon:"ghcr.io/canonical/${image_name}:${version}" - docker push ghcr.io/canonical/${image_name}:${version}