Bump library/golang from 5f5d61d
to a579ba8
#288
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: master | |
on: | |
push: {} | |
jobs: | |
master: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set lowercase image name | |
run: echo IMAGE=ghcr.io/${SLUG,,} >>$GITHUB_ENV | |
env: | |
SLUG: ${{ github.repository }} | |
- uses: actions/checkout@v3 | |
- name: Set TAG | |
run: grep -F . Tagfile && echo TAG=$(cat Tagfile) >>$GITHUB_ENV | |
- uses: docker/[email protected] | |
- name: Log in to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/[email protected] | |
with: | |
files: ./docker-bake.hcl | |
targets: goreleaser-dist | |
# TODO: cache-to | |
# set: | | |
# *.cache-to=type=registry,ref=${{ env.IMAGE }}:goreleaser-dist,mode=max | |
# TODO: cache-to | |
# - name: If on master push image to GHCR | |
# run: docker push ${{ env.IMAGE }}:goreleaser-dist | |
- name: Test CLI | |
run: | | |
tar zxvf ./dist/monkey-Linux-x86_64.tar.gz -C . | |
./monkey -h | grep monkey | |
./monkey help | grep monkey | |
./monkey version | |
./monkey fmt | |
[[ $(./monkey version | wc -l) = 1 ]] | |
./monkey version | grep -F $(cat Tagfile) | |
./monkey --version | grep -F $(cat Tagfile) | |
- uses: ncipollo/[email protected] | |
if: github.ref == 'refs/heads/master' | |
with: | |
artifacts: ./dist/* | |
commit: master # Required to push tag | |
tag: ${{ env.TAG }} # Required to push tag | |
token: ${{ secrets.GITHUB_TOKEN }} |