Skip to content

changed secret name to a DNS1123 compatible name #10

changed secret name to a DNS1123 compatible name

changed secret name to a DNS1123 compatible name #10

Workflow file for this run

name: Main
on:
push:
pull_request:
branches: [main]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 5m
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: run tests using make
run: make test
docker:
name: docker
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
with:
platforms: amd64
- uses: docker/setup-buildx-action@v2
- name: Trim Commit Hash
shell: bash
run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
- name: Set Image tag
shell: bash
id: tag
run: echo "tag=ghcr.io/snapp-incubator/cerberus:$GITHUB_SHA_SHORT" >> $GITHUB_OUTPUT
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v4
id: meta
with:
images: ghcr.io/${{ github.repository }}
- uses: docker/build-push-action@v4
with:
file: "Dockerfile"
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.tag.outputs.tag }}
labels: ${{ steps.meta.outputs.labels }}