Skip to content

Commit

Permalink
Trigger release on release event
Browse files Browse the repository at this point in the history
previously triggered upon workflow_dispatch
  • Loading branch information
tcarmet authored Feb 1, 2024
1 parent 9671a73 commit f214381
Showing 1 changed file with 8 additions and 47 deletions.
55 changes: 8 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,13 @@
name: release

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to be released'
required: true
prerelease:
description: "Is the release a GA?"
required: false
default: false
type: boolean

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildk
uses: docker/setup-buildx-action@v1
types: [published]

- name: Login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/scality/artifacts:${{ inputs.tag }}
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.event.inputs.tag }}
tag_name: ${{ github.event.inputs.tag }}
generate_release_notes: true
target_commitish: ${{ github.sha }}
jobs:
docker:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
with:
name: artifacts
namespace: scality
tag: ${{ github.ref_name }}

0 comments on commit f214381

Please sign in to comment.