Skip to content

Commit

Permalink
add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lujiajing1126 committed Aug 26, 2024
1 parent 5378dc2 commit c6da6a9
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/shouqianba-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Shouqianba Release
on:
push:
tags:
- 'v*'

env:
GOLANGCI_VERSION: 'v1.52'

jobs:
publish-artifacts:
if: github.repository == 'lujiajing1126/rollouts'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache-dependency-path: |
go.sum
- name: Code generate
run: |
make generate
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
timeout-minutes: 20
with:
context: .
push: true
tags: |
ghcr.io/lujiajing1126/rollouts:${{ github.event.release.tag_name }}
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit c6da6a9

Please sign in to comment.