From 248363da7f031e39eb9315ae5a26626766970922 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 27 Apr 2023 23:42:29 +0200 Subject: [PATCH 1/2] Build --- .github/workflows/build.yml | 42 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40092e1..5f87434 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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,20 @@ 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: + - + 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: From 31dfcfa809be645c6dec1bc959301ba90311c8a9 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 27 Apr 2023 23:52:42 +0200 Subject: [PATCH 2/2] Build --- .github/workflows/build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5f87434..b11106a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,9 +63,16 @@ jobs: bump: needs: build runs-on: ubuntu-latest - steps: + 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 + name: Update minor version uses: hmanzur/actions-set-secret@v2.0.0 with: name: 'MINOR'