diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
new file mode 100644
index 0000000..9b98826
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -0,0 +1,84 @@
+name: 🐞 Bug
+description: Create a report to help us improve
+title: "[BUG]
"
+labels: [bug, needs triage]
+
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for taking the time to fill out this bug report!
+ - type: checkboxes
+ attributes:
+ label: Is there an existing issue for this?
+ description: Please search to see if an issue already exists for the bug you encountered.
+ options:
+ - label: I have searched the existing issues
+ required: true
+ - type: textarea
+ id: what-happened
+ attributes:
+ label: Describe the bug?
+ description: A clear and concise description of what the bug is
+ placeholder: Tell us what you see!
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: To Reproduce
+ description: Steps to reproduce the behavior?
+ placeholder: |
+ 1. In this environment...
+ 2. With this config...
+ 3. Run '...'
+ 4. See error...
+ validations:
+ required: true
+ - type: dropdown
+ id: os
+ attributes:
+ label: What OS are you seeing the problem on?
+ multiple: true
+ options:
+ - ubuntu-latest or ubuntu-20.04
+ - ubuntu-18.04
+ - macos-latest or macos-10.15
+ - macos-11
+ - windows-latest or windows-2019
+ - windows-2016
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: Expected behavior?
+ description: A clear and concise description of what you expected to happen.
+ placeholder: Tell us what you expected!
+ validations:
+ required: true
+ - type: textarea
+ id: logs
+ attributes:
+ label: Relevant log output
+ description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
+ render: shell
+ - type: textarea
+ attributes:
+ label: Anything else?
+ description: |
+ Links? or References?
+
+ Anything that will give us more context about the issue you are encountering!
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
+ validations:
+ required: false
+ - type: checkboxes
+ id: terms
+ attributes:
+ label: Code of Conduct
+ description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
+ options:
+ - label: I agree to follow this project's Code of Conduct
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml
new file mode 100644
index 0000000..8b949a2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yaml
@@ -0,0 +1,52 @@
+name: Feature request
+description: Suggest an idea for this project
+title: "[Feature] "
+labels: [enhancement]
+
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for taking the time to fill out this feature request!
+ - type: textarea
+ id: what-happened
+ attributes:
+ label: Is your feature request related to a problem? Please describe.
+ description: |
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+ placeholder: Tell us what you see!
+ validations:
+ required: true
+ - type: textarea
+ id: requests
+ attributes:
+ label: Describe the solution you'd like?
+ description: A clear and concise description of what you want to happen.
+ validations:
+ required: true
+ - type: textarea
+ id: alternative
+ attributes:
+ label: Describe alternatives you've considered?
+ description: A clear and concise description of any alternative solutions or features you've considered.
+ validations:
+ required: false
+ - type: textarea
+ attributes:
+ label: Anything else?
+ description: |
+ Links? or References?
+
+ Add any other context or screenshots about the feature request here.
+
+ Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
+ validations:
+ required: false
+ - type: checkboxes
+ id: terms
+ attributes:
+ label: Code of Conduct
+ description: By submitting this issue, you agree to follow our [Code of Conduct](./CODE_OF_CONDUCT.md)
+ options:
+ - label: I agree to follow this project's Code of Conduct
+ required: true
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..c30fc17
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,12 @@
+version: 2
+updates:
+- package-ecosystem: docker
+ directory: "/"
+ schedule:
+ interval: daily
+ open-pull-requests-limit: 10
+- package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: daily
+ open-pull-requests-limit: 10
diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml
new file mode 100644
index 0000000..0ec12e5
--- /dev/null
+++ b/.github/workflows/auto-approve.yml
@@ -0,0 +1,19 @@
+name: Auto approve
+
+on:
+ pull_request_target
+
+jobs:
+ auto-approve:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: hmarr/auto-approve-action@v3
+ if: |
+ github.actor == 'dependabot[bot]' ||
+ github.actor == 'dependabot' ||
+ github.actor == 'dependabot-preview[bot]' ||
+ github.actor == 'dependabot-preview' ||
+ github.actor == 'renovate[bot]' ||
+ github.actor == 'renovate'
+ with:
+ github-token: ${{ secrets.PAT_TOKEN }}
diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml
new file mode 100644
index 0000000..ac0ee08
--- /dev/null
+++ b/.github/workflows/auto-merge.yml
@@ -0,0 +1,26 @@
+name: automerge
+on:
+ check_suite:
+ types:
+ - completed
+
+jobs:
+ automerge:
+ runs-on: ubuntu-latest
+ if: |
+ github.actor == 'dependabot[bot]' ||
+ github.actor == 'dependabot' ||
+ github.actor == 'dependabot-preview[bot]' ||
+ github.actor == 'dependabot-preview' ||
+ github.actor == 'renovate[bot]' ||
+ github.actor == 'renovate'
+ steps:
+ - name: automerge
+ uses: pascalgn/automerge-action@v0.15.6
+ env:
+ GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
+ MERGE_METHOD: "rebase"
+ UPDATE_METHOD: "rebase"
+ MERGE_RETRIES: "6"
+ MERGE_RETRY_SLEEP: "100000"
+ MERGE_LABELS: ""
diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml
new file mode 100644
index 0000000..d3ebb71
--- /dev/null
+++ b/.github/workflows/greetings.yml
@@ -0,0 +1,13 @@
+name: Greetings
+
+on: [pull_request_target, issues]
+
+jobs:
+ greeting:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/first-interaction@v1
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
+ pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."
diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml
new file mode 100644
index 0000000..0c601fd
--- /dev/null
+++ b/.github/workflows/rebase.yml
@@ -0,0 +1,18 @@
+name: Automatic Rebase
+on:
+ issue_comment:
+ types: [created]
+jobs:
+ rebase:
+ name: Rebase
+ if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ token: ${{ secrets.PAT_TOKEN }}
+ fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
+ - name: Automatic Rebase
+ uses: cirrus-actions/rebase@1.8
+ env:
+ GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
diff --git a/.github/workflows/sync-release-version.yml b/.github/workflows/sync-release-version.yml
new file mode 100644
index 0000000..b27f7d5
--- /dev/null
+++ b/.github/workflows/sync-release-version.yml
@@ -0,0 +1,36 @@
+name: Update release version.
+on:
+ release:
+ types: [published]
+
+
+jobs:
+ update-version:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - name: Run release-tagger
+ uses: tj-actions/release-tagger@v2
+ - name: Sync release version.
+ uses: tj-actions/sync-release-version@v13
+ id: sync-release-version
+ with:
+ pattern: '${{ github.repository }}@'
+ only_major: true
+ paths: README.md
+ - name: Generate CHANGELOG
+ uses: tj-actions/github-changelog-generator@v1.17
+ with:
+ output: 'HISTORY.md'
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v4
+ with:
+ base: "main"
+ labels: "merge when passing"
+ title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
+ branch: "upgrade-to-${{ steps.sync-release-version.outputs.new_version }}"
+ commit-message: "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
+ body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.sync-release-version.outputs.old_version }}...${{ steps.sync-release-version.outputs.new_version }})"
+ token: ${{ secrets.PAT_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..0d1758c
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,21 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ name: Test docker-action
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: shellcheck
+ uses: reviewdog/action-shellcheck@v1
+ - name: Run docker-action
+ uses: ./
diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml
new file mode 100644
index 0000000..15e21e0
--- /dev/null
+++ b/.github/workflows/update-readme.yml
@@ -0,0 +1,45 @@
+name: Format README.md
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ sync-assets:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Run auto-doc
+ uses: tj-actions/auto-doc@v2
+
+ - name: Run remark
+ uses: tj-actions/remark@v3
+
+ - name: Verify Changed files
+ uses: tj-actions/verify-changed-files@v13
+ id: verify_changed_files
+ with:
+ files: |
+ README.md
+
+ - name: README.md changed
+ if: steps.verify_changed_files.outputs.files_changed == 'true'
+ run: |
+ echo "README.md has uncommitted changes"
+ exit 1
+
+ - name: Create Pull Request
+ if: failure()
+ uses: peter-evans/create-pull-request@v4
+ with:
+ base: "main"
+ labels: "merge when passing"
+ title: "Updated README.md"
+ branch: "chore/update-readme"
+ commit-message: "Updated README.md"
+ body: "Updated README.md"
+ token: ${{ secrets.PAT_TOKEN }}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a53c681
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.idea/
+.envrc
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..e69de29
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..125faf7
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,9 @@
+FROM alpine:3.17.2
+
+LABEL maintainer="Tonye Jack "
+
+RUN apk add bash
+
+COPY entrypoint.sh /entrypoint.sh
+RUN chmod +x /entrypoint.sh
+ENTRYPOINT ["/entrypoint.sh"]
diff --git a/HISTORY.md b/HISTORY.md
new file mode 100644
index 0000000..be06502
--- /dev/null
+++ b/HISTORY.md
@@ -0,0 +1,4 @@
+History
+-------
+
+* Initial Release.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..34a2fdc
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2022, Tonye Jack
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b702085
--- /dev/null
+++ b/README.md
@@ -0,0 +1,53 @@
+[![CI](https://github.com/tj-actions/docker-action/workflows/CI/badge.svg)](https://github.com/tj-actions/docker-action/actions?query=workflow%3ACI)
+[![Update release version.](https://github.com/tj-actions/docker-action/workflows/Update%20release%20version./badge.svg)](https://github.com/tj-actions/docker-action/actions?query=workflow%3A%22Update+release+version.%22)
+[![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fdocker-action%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+docker-action+path%3A.github%2Fworkflows+language%3AYAML\&s=\&type=Code)
+
+## docker-action
+
+Template Docker action
+
+```yaml
+...
+ steps:
+ - uses: actions/checkout@v2
+ - name: Docker Action
+ uses: tj-actions/docker-action@v1
+```
+
+## Inputs
+
+
+
+| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
+|-------|--------|----------|-------------------------|-----------------------------------|
+| token | string | true | `"${{ github.token }}"` | GITHUB\_TOKEN or a Repo scoped PAT |
+
+
+
+* Free software: [MIT license](LICENSE)
+
+If you feel generous and want to show some extra appreciation:
+
+[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]
+
+[buymeacoffee]: https://www.buymeacoffee.com/jackton1
+
+[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
+
+## Features
+
+* TODO
+
+## Credits
+
+This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter) using [cookiecutter-action](https://github.com/tj-actions/cookiecutter-action)
+
+## Report Bugs
+
+Report bugs at https://github.com/tj-actions/docker-action/issues.
+
+If you are reporting a bug, please include:
+
+* Your operating system name and version.
+* Any details about your workflow that might be helpful in troubleshooting.
+* Detailed steps to reproduce the bug.
diff --git a/action.yml b/action.yml
new file mode 100644
index 0000000..5f91bdb
--- /dev/null
+++ b/action.yml
@@ -0,0 +1,17 @@
+name: Docker Action
+description: Template Docker action
+author: tj-actions
+inputs:
+ token:
+ description: 'GITHUB_TOKEN or a Repo scoped PAT'
+ required: true
+ default: ${{ github.token }}
+
+runs:
+ using: 'docker'
+ image: 'Dockerfile'
+ args:
+ - ${{ inputs.token }}
+branding:
+ icon: check-square
+ color: white
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100755
index 0000000..df82332
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+set -e
diff --git a/renovate.json b/renovate.json
new file mode 100644
index 0000000..a11c9eb
--- /dev/null
+++ b/renovate.json
@@ -0,0 +1,45 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "enabled": true,
+ "prHourlyLimit": 10,
+ "prConcurrentLimit": 5,
+ "rebaseWhen": "behind-base-branch",
+ "addLabels": [
+ "dependencies",
+ "merge when passing"
+ ],
+ "assignees": [
+ "jackton1"
+ ],
+ "assignAutomerge": true,
+ "dependencyDashboard": true,
+ "dependencyDashboardAutoclose": true,
+ "lockFileMaintenance": {
+ "enabled": true,
+ "automerge": true
+ },
+ "packageRules": [
+ {
+ "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
+ "automerge": true,
+ "rebaseWhen": "behind-base-branch",
+ "addLabels": [
+ "automerge"
+ ]
+ },
+ {
+ "description": "docker images",
+ "matchLanguages": [
+ "docker"
+ ],
+ "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
+ "rebaseWhen": "behind-base-branch",
+ "addLabels": [
+ "automerge"
+ ],
+ "automerge": true
+ }
+ ]
+}