From 9bf3019b8a5fa757cc142b9e567610036bb45be0 Mon Sep 17 00:00:00 2001 From: Andrejs Date: Sun, 21 Jul 2024 11:40:09 +0300 Subject: [PATCH] Remove publish of latest image to ghcr (#783) * Remove publish of latest image to ghcr * Bump ruby in version bump job --- .github/workflows/release.yml | 31 +++---------------------------- .github/workflows/version.yml | 4 ++-- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5040b49e..4aa4f7fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,16 +2,8 @@ name: Release on: push: - branches: - - main tags: - v[0-9]+.[0-9]+.[0-9]+ - paths: - - lib/**/* - - exe/allure-report-publisher - - allure-report-publisher.gemspec - - Dockerfile - - Gemfile.lock jobs: docker: @@ -25,30 +17,15 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.4.0 - name: Login to DockerHub - if: startsWith(github.ref, 'refs/tags/') uses: docker/login-action@v3.2.0 with: username: ${{ github.actor }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GitHub Container Registry - uses: docker/login-action@v3.2.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Set images - id: images - run: | - if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then - echo "IMAGES=andrcuns/allure-report-publisher,ghcr.io/andrcuns/allure-report-publisher" >> "$GITHUB_OUTPUT" - else - echo "IMAGES=ghcr.io/andrcuns/allure-report-publisher" >> "$GITHUB_OUTPUT" - fi - name: Docker tags id: tags uses: docker/metadata-action@v5 with: - images: ${{ steps.images.outputs.IMAGES }} + images: andrcuns/allure-report-publisher flavor: latest=false tags: | type=raw,value=latest @@ -66,14 +43,13 @@ jobs: gem: name: Ruby gem runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout uses: actions/checkout@v4.1.6 - - name: Set up Ruby 3.2 + - name: Set up Ruby 3.3 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.3 bundler-cache: true - name: Build and push run: bundle exec rake release @@ -83,7 +59,6 @@ jobs: gh-release: name: Github release runs-on: ubuntu-22.04 - if: startsWith(github.ref, 'refs/tags/') permissions: contents: write steps: diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index da756e9a..dba9e878 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -21,10 +21,10 @@ jobs: with: fetch-depth: 0 ssh-key: ${{ secrets.RELEASE_SSH_KEY }} - - name: Set up Ruby 3.1 + - name: Set up Ruby 3.3 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.2 + ruby-version: 3.3 bundler-cache: true - name: Update version run: |