Skip to content

Commit 8003980

Browse files
committed
enable release pipeline
1 parent 6f20438 commit 8003980

File tree

2 files changed

+40
-37
lines changed

2 files changed

+40
-37
lines changed

Diff for: .github/workflows/release.yaml

+39-37
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
with:
3535
token: ${{ secrets.GITHUB_TOKEN }}
3636
# This check name is defined as the github action job name (in .github/workflows/validations.yaml)
37-
checkName: "Unit tests"
37+
checkName: "Unit tests (ubuntu-latest)"
3838
ref: ${{ github.event.pull_request.head.sha || github.sha }}
3939

4040
- name: Check acceptance test results (linux)
@@ -76,39 +76,41 @@ jobs:
7676
7777
false
7878
79-
# TODO: uncomment this when we have a release process tested and ready to go
80-
# release:
81-
# needs: [quality-gate]
82-
# runs-on: ubuntu-latest
83-
# permissions:
84-
# # for tagging
85-
# contents: write
86-
# steps:
87-
#
88-
# - uses: actions/checkout@v3
89-
# with:
90-
# fetch-depth: 0
91-
#
92-
# - name: Bootstrap environment
93-
# uses: ./.github/actions/bootstrap
94-
#
95-
# - name: Tag release
96-
# run: |
97-
# git tag ${{ github.event.inputs.version }}
98-
# git push origin --tags
99-
# env:
100-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
#
102-
# - name: Login to Docker Hub
103-
# uses: docker/login-action@v2
104-
# with:
105-
# username: ${{ secrets.DOCKER_USERNAME }}
106-
# password: ${{ secrets.DOCKER_PASSWORD }}
107-
#
108-
# - name: Build & publish release artifacts
109-
# run: make ci-release
110-
# env:
111-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
#
113-
# - name: Smoke test published image
114-
# run: make ci-test-docker-image
79+
release:
80+
needs: [quality-gate]
81+
runs-on: ubuntu-latest
82+
permissions:
83+
# for tagging
84+
contents: write
85+
steps:
86+
87+
- uses: actions/checkout@v3
88+
with:
89+
fetch-depth: 0
90+
91+
- name: Bootstrap environment
92+
uses: ./.github/actions/bootstrap
93+
94+
- name: Tag release
95+
run: |
96+
git tag ${{ github.event.inputs.version }}
97+
git push origin --tags
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
101+
- name: Login to Docker Hub
102+
uses: docker/login-action@v2
103+
with:
104+
username: ${{ secrets.DOCKER_USERNAME }}
105+
password: ${{ secrets.DOCKER_PASSWORD }}
106+
107+
- name: Build & publish release artifacts
108+
run: make ci-release
109+
env:
110+
# for creating the release (requires write access to content)
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
# for updating brew formula in wagoodman/homebrew-dive
113+
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
114+
115+
- name: Smoke test published image
116+
run: make ci-test-docker-image

Diff for: .goreleaser.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ brews:
2323
- repository:
2424
owner: wagoodman
2525
name: homebrew-dive
26+
token: "{{.Env.TAP_GITHUB_TOKEN}}"
2627
homepage: "https://github.com/wagoodman/dive/"
2728
description: "A tool for exploring layers in a docker image"
2829

0 commit comments

Comments
 (0)