Skip to content

fix(deps): update module google.golang.org/api to v0.199.0 (#72) #242

fix(deps): update module google.golang.org/api to v0.199.0 (#72)

fix(deps): update module google.golang.org/api to v0.199.0 (#72) #242

Workflow file for this run

name: go
on:
push:
branches:
- main
pull_request:
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run tests
run: go test -v ./...
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
build:
needs:
- test
- golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set config
id: set_config
run: |
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
LATEST_SHA="${{ github.event.pull_request.head.sha }}"
TAGS="pr-${{ github.event.number }}-${LATEST_SHA:0:7}"
REPO=cloud-run-slack-bot-dev
elif [ "$GITHUB_EVENT_NAME" == "push" ]; then
TAGS="${GITHUB_SHA:0:7}"
REPO=cloud-run-slack-bot-dev
elif [ "$GITHUB_EVENT_NAME" == "release" ]; then
TAGS="$GITHUB_REF_NAME"
REPO=cloud-run-slack-bot
fi
echo "TAGS=$TAGS" >> "$GITHUB_OUTPUT"
echo "REPO=$REPO" >> "$GITHUB_OUTPUT"
- name: Set up ko
uses: ko-build/[email protected]
env:
KO_DOCKER_REPO: "index.docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ steps.set_config.outputs.REPO }}"
with:
version: v0.15.0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
run: ko build . --tags="${{ steps.set_config.outputs.TAGS }},latest" --bare