Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix GitHub Action #91

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch Previous version
id: get-previous-tag
uses: actions-ecosystem/action-get-latest-tag@v1.6.0

- name: Run semantic-release
run: |
npm install --save-dev semantic-release@17.2.4
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Fetch Previous version
id: get-previous-tag
uses: actions-ecosystem/action-get-latest-tag@v1.6.0

- name: Fetch Current version
id: get-current-tag
uses: actions-ecosystem/action-get-latest-tag@v1.6.0
Expand All @@ -69,6 +69,15 @@ jobs:

fi

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
version: latest

- name: Log in to Docker Hub
uses: docker/login-action@v1
if: github.repository == 'casbin/casbin-server' && github.event_name == 'push' && steps.should_push.outputs.push=='true'
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM golang:1.17
FROM golang:1.17 as STANDARD

RUN apt-get update && \
apt-get -y install unzip build-essential autoconf libtool

ARG TARGETOS
ARG TARGETARCH
ENV BUILDX_ARCH="${TARGETOS:-linux}_${TARGETARCH:-amd64}"

# Install protobuf from source
RUN curl -LjO https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.17.3.zip && \
unzip v3.17.3.zip && \
Expand Down