Skip to content

Commit

Permalink
Remove publish of latest image to ghcr (#783)
Browse files Browse the repository at this point in the history
* Remove publish of latest image to ghcr

* Bump ruby in version bump job
  • Loading branch information
andrcuns authored Jul 21, 2024
1 parent 6ba7755 commit 9bf3019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
31 changes: 3 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -25,30 +17,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/[email protected]
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/[email protected]
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
Expand All @@ -66,14 +43,13 @@ jobs:
gem:
name: Ruby gem
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/[email protected]
- 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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 9bf3019

Please sign in to comment.