Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes to workflows #728

Merged
merged 4 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ jobs:
MD_CONFIG: .github/md_config.json
DOC_SRC: README.md
MD_LINT_CONFIG: .markdownlint.yaml

build:

permissions:
contents: read

runs-on: ubuntu-latest
name: Build
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ env:

jobs:
build:

permissions:
contents: read
packages: write # to push artifacts to `ghcr.io`

name: Build
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
Expand All @@ -27,6 +32,7 @@ jobs:
with:
token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
submodules: recursive

# Setting up helm binary
- name: Set up Helm
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ env:

jobs:
build:

permissions:
contents: read
packages: write # to push artifacts to `ghcr.io`

name: GoReleaser build
runs-on: ubuntu-latest

Expand All @@ -24,6 +29,7 @@ jobs:
with:
token: ${{ secrets.STAKATER_GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
submodules: recursive

# Setting up helm binary
- name: Set up Helm
Expand Down Expand Up @@ -171,22 +177,7 @@ jobs:
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}

- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- '.markdownlint.yaml'
- '.vale.ini'
- 'Dockerfile-docs'
- 'docs-nginx.conf'
- 'docs/**'
- 'README.md'
- 'theme_common'
- 'theme_override'

- name: Build and Push Docker Image for Docs to ghcr registry
if: steps.filter.outputs.docs == 'true'
uses: docker/build-push-action@v5
with:
context: .
Expand Down
Loading