Skip to content

Commit

Permalink
Merge pull request #728 from stakater/misc-work
Browse files Browse the repository at this point in the history
Misc fixes to workflows
  • Loading branch information
MuneebAijaz authored Aug 20, 2024
2 parents 76372be + babe5b0 commit c06ecd1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
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

0 comments on commit c06ecd1

Please sign in to comment.