-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added automation to fetch latest tag
- Loading branch information
1 parent
d9e6adf
commit 031fc44
Showing
4 changed files
with
85 additions
and
23 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,10 +1,5 @@ | ||
name: Continuous Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
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 |
---|---|---|
|
@@ -2,30 +2,44 @@ name: Manual Deployment | |
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '59 23 * * *' | ||
|
||
jobs: | ||
deploy: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
fetch-depth: 0 | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v1 | ||
- id: latest_tag | ||
uses: thebritican/[email protected] | ||
with: | ||
registry: registry.moveyourdigital.dev | ||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | ||
github_token: ${{ github.token }} | ||
repo_path: actions/runner | ||
|
||
- name: Build and Push to Docker Registry | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: registry.moveyourdigital.dev/github/actions-runner:latest | ||
- id: output | ||
run: "echo 'RUNNER_VERSION=\"${{ steps.latest_tag.outputs.tag_name }}\"'" | ||
|
||
# - name: Update Dockerfile RUNNER_VERSION org | ||
# run: sed -i.bak "s/RUNNER_VERSION.*/RUNNER_VERSION=\"${steps.latest_tag.outputs.}\"/" Dockerfile | ||
|
||
# - name: Login to Docker Registry | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: registry.moveyourdigital.dev | ||
# username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
# password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | ||
|
||
# - name: Build and Push to Docker Registry | ||
# uses: docker/build-push-action@v2 | ||
# with: | ||
# context: . | ||
# platforms: linux/amd64 | ||
# push: true | ||
# tags: registry.moveyourdigital.dev/github/actions-runner:latest | ||
|
||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} | ||
# - name: Image digest | ||
# run: echo ${{ steps.docker_build.outputs.digest }} |
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,53 @@ | ||
name: Update Version | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '59 23 * * *' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- id: fetch-latest-release | ||
uses: thebritican/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
repo_path: actions/runner | ||
|
||
- id: commit | ||
run: | | ||
TAG=${{ steps.fetch-latest-release.outputs.tag_name }} | ||
sed -i.bak "s/RUNNER_VERSION.*/RUNNER_VERSION=\"${TAG:1}\"/" Dockerfile | ||
if [[ `git status -uno --porcelain` ]]; then | ||
git config --global user.name 'lightningspirit [Automated 🤖]' | ||
git config --global user.email '[email protected]' | ||
git commit -am "Bump to $TAG" | ||
git push | ||
fi | ||
# - name: Update Dockerfile RUNNER_VERSION org | ||
# run: sed -i.bak "s/RUNNER_VERSION.*/RUNNER_VERSION=\"${steps.latest_tag.outputs.}\"/" Dockerfile | ||
|
||
# - name: Login to Docker Registry | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# registry: registry.moveyourdigital.dev | ||
# username: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
# password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | ||
|
||
# - name: Build and Push to Docker Registry | ||
# uses: docker/build-push-action@v2 | ||
# with: | ||
# context: . | ||
# platforms: linux/amd64 | ||
# push: true | ||
# tags: registry.moveyourdigital.dev/github/actions-runner:latest | ||
|
||
# - name: Image digest | ||
# run: echo ${{ steps.docker_build.outputs.digest }} |
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