-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
10 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,14 +1,63 @@ | ||
name: Docker Image CI | ||
name: CI/CD Pipeline | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ "master" ] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install setuptools wheel twine | ||
pip install python-semantic-release | ||
- name: Semantic Release | ||
id: semantic_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: semantic-release publish | ||
|
||
- name: Extract version | ||
id: extract_version | ||
run: echo "VERSION=$(python -c 'import semantic_release; print(semantic_release.__version__)')" >> $GITHUB_ENV | ||
|
||
build: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag Steam-Stats:$(date +%s) | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
nicconike/steam-stats:${{ env.VERSION }} | ||
- name: Remove dangling images | ||
run: docker image prune -f |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
branches: | ||
[ | ||
{ name: "1.1.x", range: "1.1.x", channel: "1.1.x" }, | ||
{ name: "1.2.x", range: "1.2.x", channel: "1.2.x" }, | ||
{ name: "master" }, | ||
{ name: "pre/rc", channel: "pre/rc", prerelease: "rc" }, | ||
{ name: "beta", channel: "beta", prerelease: true }, | ||
], | ||
plugins: | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["api/*.py"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}", | ||
}, | ||
], | ||
"@semantic-release/github", | ||
], | ||
} |
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
34e17dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
steam-stats – ./
steam-readme-stats.vercel.app
steam-stats-git-master-nicco-projects.vercel.app
steam-stats-nicco-projects.vercel.app