Skip to content

Commit

Permalink
Correct release build trigger. (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Oct 23, 2020
1 parent 183351a commit cbed6b8
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: release

on:
push:
tags:
- 'v*'
release:
types:
- published

env:
GCS_BUCKET: images.metal-pod.io

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,6 +19,11 @@ jobs:
version: '278.0.0'
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: metal-stack/action-docker-make@master
with:
Expand All @@ -33,22 +38,12 @@ jobs:
cp metal-hammer-initrd.img.lz4* images/metal-hammer/${GITHUB_REF##*/}
- name: Upload image tarballs to GCS
run: gsutil -m cp -r -p images/metal-hammer gs://$GCS_BUCKET
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: metal-hammer ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: metal-hammer-initrd.img.lz4
asset_name: metal-hammer-initrd.img.lz4
asset_content_type: application/gzip
Expand All @@ -57,7 +52,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: metal-hammer-initrd.img.lz4.md5
asset_name: metal-hammer-initrd.img.lz4.md5
asset_content_type: text/html
asset_content_type: text/html

0 comments on commit cbed6b8

Please sign in to comment.