Skip to content

Commit 7dbd2c4

Browse files
committed
fixed actions
1 parent 9e4f6d5 commit 7dbd2c4

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ name: CI
44
on:
55
# Triggers the workflow on push or pull request events but only for the main branch
66
push:
7-
branches: [ master ]
7+
branches: [master]
88
tags:
9-
- '*'
9+
- "*"
1010
pull_request:
11-
branches: [ master ]
11+
branches: [master]
1212

1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
@@ -19,7 +19,7 @@ jobs:
1919
build:
2020
# The type of runner that the job will run on
2121
runs-on: ubuntu-latest
22-
22+
2323
strategy:
2424
matrix:
2525
os: [linux, darwin]
@@ -28,12 +28,17 @@ jobs:
2828
# Steps represent a sequence of tasks that will be executed as part of the job
2929
steps:
3030
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31-
- uses: actions/checkout@v2
32-
31+
- uses: actions/checkout@v3
32+
3333
- name: Setup Go environment
34-
uses: actions/setup-go@v2.1.4
34+
uses: actions/setup-go@v3
3535
with:
36-
go-version: 1.17
36+
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
37+
go-version: 1.20.1
38+
# Whether to download only stable versions
39+
# stable: # optional, default is true
40+
# Used to pull node distributions from go-versions. Since there's a default, this is typically not supplied by the user.
41+
# token: # optional, default is ${{ github.token }}
3742

3843
- name: Build executable
3944
run: |
@@ -43,15 +48,14 @@ jobs:
4348
env:
4449
GOOS: ${{ matrix.os }}
4550
GOARCH: ${{ matrix.arch }}
46-
51+
4752
- name: compress executable
4853
run: |
49-
# apt update && apt install zip -y
50-
cd dist
54+
cd ./dist
5155
chmod +x cloudpile
5256
zip cloudpile-${{ matrix.os }}-${{ matrix.arch }}.zip cloudpile
5357
ls -lha .
54-
58+
5559
- name: Release
5660
uses: softprops/action-gh-release@v1
5761
if: startsWith(github.ref, 'refs/tags/')
@@ -66,12 +70,10 @@ jobs:
6670
needs: build
6771

6872
steps:
69-
7073
- name: Docker meta
7174
id: meta
7275
uses: docker/metadata-action@v3
7376
with:
74-
7577
# list of Docker images to use as base name for tags
7678
images: |
7779
quay.io/wasilak/cloudpile
@@ -87,17 +89,17 @@ jobs:
8789
8890
- name: Set up QEMU
8991
uses: docker/setup-qemu-action@v1
90-
92+
9193
- name: Set up Docker Buildx
9294
uses: docker/setup-buildx-action@v1
93-
95+
9496
- name: Login to Quay.io
9597
uses: docker/login-action@v1
9698
with:
9799
registry: quay.io
98100
username: ${{ secrets.QUAY_IO_LOGIN }}
99101
password: ${{ secrets.QUAY_IO_PASSWORD }}
100-
102+
101103
- name: Build and push
102104
id: docker_build
103105
uses: docker/build-push-action@v2
@@ -106,4 +108,3 @@ jobs:
106108
push: ${{ github.event_name != 'pull_request' }}
107109
tags: ${{ steps.meta.outputs.tags }}
108110
labels: ${{ steps.meta.outputs.labels }}
109-

0 commit comments

Comments
 (0)