syft/.github/workflows/release-follow-up.yaml
Dan Luhring 6195002ae5
Add docker image and refactor release pipeline (#310)
* Create independent build targets for Mac and Linux

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Create targets for macOS signing and notarization

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Create target for Linux packaging

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Update release workflow and leverage new make targets

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Add release assets to release draft

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Add homebrew formula release follow-up and improve Makefile

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Add follow-up workflow for updating version check file

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Get rid of fetch depth 0 for checkout action

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Add follow-up workflow for Docker images

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Restore wait-for-checks job

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Replace make functions with shell functions

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* Account for envsubst command in bootstrap-ci-linux

Signed-off-by: Dan Luhring <dan.luhring@anchore.com>

* move homebrew generation into script

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* add release approval step; remove goreleaser; add docker image smoke testing in acceptance step

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* replace homebrew formula template file with heredoc template

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* update release documentation

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
2021-03-10 13:25:31 -05:00

81 lines
2.0 KiB
YAML

name: "Release follow-up"
on:
release:
types: [published]
jobs:
create-homebrew-formula:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate homebrew formula
run: make homebrew-formula-generate
- uses: actions/upload-artifact@v2
with:
path: "./dist/syft.rb"
test-formula-linux:
runs-on: ubuntu-latest
needs: create-homebrew-formula
steps:
- uses: actions/download-artifact@v2
with:
path: "dist"
- name: Test homebrew formula
run: make homebrew-formula-test
test-formula-mac:
runs-on: macos-latest
needs: create-homebrew-formula
steps:
- uses: actions/download-artifact@v2
with:
path: "dist"
- name: Test homebrew formula
run: make homebrew-formula-test
publish-formula:
runs-on: ubuntu-latest
needs: [ test-formula-linux, test-formula-mac ]
steps:
- uses: actions/download-artifact@v2
- name: Publish updated homebrew formula
run: homebrew-formula-publish
update_version_check_file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update version check file
run: make version-check-update
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TOOLBOX_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLBOX_AWS_SECRET_ACCESS_KEY }}
build_and_push_container_image:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.TOOLBOX_DOCKER_USER }}
password: ${{ secrets.TOOLBOX_DOCKER_PASS }}
- name: Stage released artifacts
run: make stage-released-linux-artifact
- name: Build and tag Docker images
run: make container-image-build
- name: Smoke test Docker image
run: make container-image-smoke-test
- name: Push Docker images
run: make container-image-push