enable release pipeline

This commit is contained in:
Alex Goodman 2023-07-07 11:42:48 -04:00
parent 6f20438ae4
commit 8003980604
2 changed files with 40 additions and 37 deletions

View file

@ -34,7 +34,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
# This check name is defined as the github action job name (in .github/workflows/validations.yaml)
checkName: "Unit tests"
checkName: "Unit tests (ubuntu-latest)"
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Check acceptance test results (linux)
@ -76,39 +76,41 @@ jobs:
false
# TODO: uncomment this when we have a release process tested and ready to go
# release:
# needs: [quality-gate]
# runs-on: ubuntu-latest
# permissions:
# # for tagging
# contents: write
# steps:
#
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Bootstrap environment
# uses: ./.github/actions/bootstrap
#
# - name: Tag release
# run: |
# git tag ${{ github.event.inputs.version }}
# git push origin --tags
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Build & publish release artifacts
# run: make ci-release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Smoke test published image
# run: make ci-test-docker-image
release:
needs: [quality-gate]
runs-on: ubuntu-latest
permissions:
# for tagging
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Bootstrap environment
uses: ./.github/actions/bootstrap
- name: Tag release
run: |
git tag ${{ github.event.inputs.version }}
git push origin --tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build & publish release artifacts
run: make ci-release
env:
# for creating the release (requires write access to content)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# for updating brew formula in wagoodman/homebrew-dive
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
- name: Smoke test published image
run: make ci-test-docker-image

View file

@ -23,6 +23,7 @@ brews:
- repository:
owner: wagoodman
name: homebrew-dive
token: "{{.Env.TAP_GITHUB_TOKEN}}"
homepage: "https://github.com/wagoodman/dive/"
description: "A tool for exploring layers in a docker image"