Build
Build
This commit is contained in:
commit
f44c3403a5
1 changed files with 27 additions and 22 deletions
49
.github/workflows/build.yml
vendored
49
.github/workflows/build.yml
vendored
|
@ -2,7 +2,8 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.gitignore'
|
||||
|
@ -31,27 +32,10 @@ jobs:
|
|||
--build-arg "DATE_ARG=${{ github.event.repository.updated_at }}" \
|
||||
--label "build=${GITHUB_RUN_ID}" \
|
||||
--label "version=${{ secrets.MAJOR }}.${{ secrets.MINOR }}" \
|
||||
--tag "${{ secrets.DOCKERHUB_REPO }}:latest" \
|
||||
--tag "${{ secrets.DOCKERHUB_REPO }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" \
|
||||
--tag "${{ github.repository }}:latest" \
|
||||
--tag "${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" \
|
||||
--tag "ghcr.io/${{ github.repository }}:latest" \
|
||||
--tag "ghcr.io/${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}"
|
||||
-
|
||||
name: Update Minor version
|
||||
uses: hmanzur/actions-set-secret@v2.0.0
|
||||
with:
|
||||
name: 'MINOR'
|
||||
value: $((${{ secrets.MINOR }}+1))
|
||||
repository: ${{ github.repository }}
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
-
|
||||
name: Create tag
|
||||
uses: rickstaa/action-create-tag@v1
|
||||
id: "tag_create"
|
||||
if: ${{ false }}
|
||||
with:
|
||||
tag: "v${{ secrets.MAJOR }}.${{ secrets.MINOR }}"
|
||||
tag_exists_error: false
|
||||
message: "Release v${{ secrets.MAJOR }}.${{ secrets.MINOR }}"
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
|
@ -61,8 +45,8 @@ jobs:
|
|||
-
|
||||
name: Push to DockerHub
|
||||
run: |
|
||||
docker push "${{ secrets.DOCKERHUB_REPO }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" &&\
|
||||
docker push "${{ secrets.DOCKERHUB_REPO }}:latest"
|
||||
docker push "${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" &&\
|
||||
docker push "${{ github.repository }}:latest"
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
|
@ -75,6 +59,27 @@ jobs:
|
|||
run: |
|
||||
docker push "ghcr.io/${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" && \
|
||||
docker push "ghcr.io/${{ github.repository }}:latest"
|
||||
|
||||
bump:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
-
|
||||
name: Push tag
|
||||
uses: anothrNick/github-tag-action@1.61.0 # Don't use @master unless you're happy to test the latest version
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CUSTOM_TAG: ${{ secrets.MAJOR }}.${{ secrets.MINOR }}
|
||||
-
|
||||
name: Update minor version
|
||||
uses: hmanzur/actions-set-secret@v2.0.0
|
||||
with:
|
||||
name: 'MINOR'
|
||||
value: $((${{ secrets.MINOR }}+1))
|
||||
repository: ${{ github.repository }}
|
||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
|
|
Loading…
Reference in a new issue