Skip to content

Commit

Permalink
enable release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
wagoodman committed Jul 7, 2023
1 parent 6f20438 commit 8003980
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 37 deletions.
76 changes: 39 additions & 37 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 8003980

Please sign in to comment.