Skip to content

Commit

Permalink
ci: rollback release-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gdegiorgio committed Mar 7, 2024
1 parent 65cd86d commit 5e0eeb4
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 34 deletions.
57 changes: 33 additions & 24 deletions .github/workflows/push-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,44 @@ on:
tags:
- 'v*'
jobs:
Patch:
build-and-push:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'

- name: Set safe git dir
run : |
git config --global --add safe.directory /github/workspace
fetch-depth: 0

- name: Minor version for each merge
id: dryrun
uses: anothrNick/github-tag-action@1.36.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DRY_RUN: true

- name: Show new Tag
run: |
echo "The next tag version will be: ${{ steps.dryrun.outputs.new_tag }}"
- name: Show Part
- name: Get latest tag
run: |
echo "The version increment was: ${{ steps.dryrun.outputs.part }}"
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "Latest tag is $latest_tag"
echo "::set-output name=latest_tag::$latest_tag"
- name: Tag repository
id: tagRepo
uses: anothrNick/github-tag-action@1.36.0
env:
- name: Determine new version
id: semver
uses: anothrNick/github-tag-action@1.20.0
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WITH_V: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push latest
uses: docker/build-push-action@v5
with:
push: true
tags: giovannidegiorgio/sons-of-the-docker:latest
- name: Build and push tag
uses: docker/build-push-action@v5
with:
push: true
tags: giovannidegiorgio/sons-of-the-docker:latest
37 changes: 27 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,37 @@ on:
- main

jobs:
build-and-push:
Patch:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
fetch-depth: 0
fetch-depth: '0'

- name: Determine new version
id: semver
uses: anothrNick/github-tag-action@1.20.0
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Set safe git dir
run : |
git config --global --add safe.directory /github/workspace
- name: Minor version for each merge
id: dryrun
uses: anothrNick/github-tag-action@1.36.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DRY_RUN: true

- name: Show new Tag
run: |
echo "The next tag version will be: ${{ steps.dryrun.outputs.new_tag }}"
- name: Show Part
run: |
echo "The version increment was: ${{ steps.dryrun.outputs.part }}"
- name: Tag repository
id: tagRepo
uses: anothrNick/github-tag-action@1.36.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WITH_V: true


0 comments on commit 5e0eeb4

Please sign in to comment.