Skip to content

feat: add envs

feat: add envs #4

Workflow file for this run

# mvp: https://github.com/mariadb-corporation/skysql-api-go/blob/main/.github/workflows/publish.yml
name: Publish
on:
push:
branches:
- master
- next
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
name: Publish new release
if: github.ref == 'refs/heads/master'
timeout-minutes: 5
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Check Out Repo
uses: actions/checkout@v2
with: # https://stackoverflow.com/a/65081720
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: "0"
- name: Install Auto
run : npm i -g auto @auto-it/upload-assets @auto-it/git-tag @auto-it/pr-body-labels @auto-it/exec
- name: Configure git
run: |
git config --global user.email "kbw-ci-bot@mail.ccil-kbw.com"
git config --global user.name "kbw-ci-bot"
- name: Publish new version
run: GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" auto shipit
- id: version
name: Output new version
run: echo "::set-output name=version::$(git describe --tags)"
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64]
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.34
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.2.linux-amd64.tar.gz"
project_path: "./cmd/discord_bot"
binary_name: "iqamabot"
extra_files: README.md
- uses: wangyoucao577/go-release-action@v1.34
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.2.linux-amd64.tar.gz"
project_path: "./cmd/darsrec"
binary_name: "darsrec"
extra_files: README.md
- uses: wangyoucao577/go-release-action@v1.34
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.2.linux-amd64.tar.gz"
project_path: "./cmd/yt-upload-v2"
binary_name: "yt-upload-v2"
extra_files: README.md
docker-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: AMD64 - Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./build/docker/Dockerfile
push: true
tags: ${{ jobs.release.outputs.version }}

Check failure on line 109 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 109, Col: 17): Unrecognized named-value: 'jobs'. Located at position 1 within expression: jobs.release.outputs.version
labels: ${{ steps.meta.outputs.labels }}