-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from Twinki14/workflow-cleanup
Standardize & Cleanup workflows
- Loading branch information
Showing
3 changed files
with
53 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,31 @@ | ||
name: Docker-Image-Dev | ||
on: | ||
name: Developer image | ||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to DockerHub | ||
- name: Docker - Login | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Docker meta | ||
- name: Docker - Metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
${{ github.repository }} | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=raw,value=dev | ||
# always generate latest tag on push | ||
images: ${{ github.repository }} | ||
tags: type=raw,value=dev | ||
flavor: latest=false | ||
|
||
- name: Build and push to DockerHub | ||
id: docker_build | ||
- name: Docker - Build / Push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: | | ||
${{ steps.meta.outputs.tags }} | ||
tags: ${{ steps.meta.outputs.tags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
name: Linting | ||
on: [pull_request] | ||
on: | ||
pull_request: | ||
|
||
run-name: Pull request - ${{ github.event.pull_request.number }} | ||
jobs: | ||
shellcheck: | ||
name: Lint - Shell | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Shellcheck | ||
uses: ludeeus/[email protected] | ||
|
||
dockerlint: | ||
name: Lint - Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: hadolint/[email protected] | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: Dockerfile | ||
lint: 'hadolint' | ||
|
||
markdownlint: | ||
name: Lint - Markdown | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- uses: DavidAnson/markdownlint-cli2-action@v15 | ||
with: | ||
config: '.markdownlint.jsonc' | ||
globs: '**/*.md' | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Lint - Markdown | ||
uses: DavidAnson/markdownlint-cli2-action@v15 | ||
with: | ||
config: ".markdownlint.jsonc" | ||
globs: "**/*.md" | ||
|
||
test-build: | ||
name: Docker - Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build the Image | ||
uses: docker/build-push-action@v2 | ||
- name: Docker - Build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: false | ||
push: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,36 @@ | ||
name: Release | ||
on: | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
- name: Docker - Login | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Docker meta | ||
- name: Docker - Metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
${{ github.repository }} | ||
images: ${{ github.repository }} | ||
# generate Docker tags based on the following events/attributes | ||
tags: | | ||
type=semver,pattern=v{{version}} | ||
type=semver,pattern=v{{major}}.{{minor}} | ||
type=semver,pattern=v{{major}} | ||
# always generate latest tag on push | ||
flavor: | | ||
latest=true | ||
- name: Build and push to DockerHub & GitHub Packages | ||
flavor: latest=true | ||
|
||
- name: Docker - Build / Push | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
tags: ${{ steps.meta.outputs.tags }} |