Skip to content

Commit

Permalink
add release steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfz0r committed Dec 11, 2023
1 parent 4c317a4 commit 4f1af4c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/shared/docker-chocolatey/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ inputs:
command:
description: 'The command to exec'
required: true
jsonEnv:
description: 'Environment to pass to docker run as json string'
required: false
default: "{}"

runs:
using: 'docker'
image: 'Dockerfile'
env: ${{ fromJSON(inputs.jsonEnv) }}
args:
- ${{ inputs.command }}

23 changes: 22 additions & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,25 @@ jobs:
name: sidecar-artifacts
retention-days: 14
path: |
dist/pkg
dist/pkg
- name: Chocolatey Push
if: startsWith(github.ref, 'refs/tags/')
uses: ./.github/shared/docker-chocolatey
with:
command: make push-chocolatey
jsonEnv: '{ "CHOCO_API_KEY": "${{ secrets.CHOCO_API_KEY }}" }'

- name: "Upload sidecar artifacts to S3"
if: startsWith(github.ref, 'refs/tags/')
env:
AWS_DEFAULT_REGION: "eu-west-1"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SIDECAR_RELEASES_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SIDECAR_RELEASES_SECRET_KEY }}
run: |
aws s3 cp --no-progress --recursive dist/pkg s3://graylog2-releases/graylog-collector-sidecar/${{ github.ref_name }}/
- name: "Releasing to Github"
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release create ${{ github.ref_name }} --draft --notes "Insert changes here." dist/pkg/*

0 comments on commit 4f1af4c

Please sign in to comment.