Skip to content

Commit

Permalink
Use v4 of actions/download-artifact action
Browse files Browse the repository at this point in the history
  • Loading branch information
Loupeznik committed Sep 8, 2024
1 parent 909ab0a commit abc6339
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI/CD

on:
push:
branches: [ "master", "develop" ]
tags: [ "v*.*.*" ]
branches: ["master", "develop"]
tags: ["v*.*.*"]
pull_request:
branches: [ "master" ]
branches: ["master"]

permissions:
contents: write
Expand All @@ -16,65 +16,65 @@ jobs:
runs-on: ubuntu-latest
env:
GO111MODULE: on

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"

- name: Install dependencies
run: |
go install github.com/swaggo/swag/cmd/[email protected]
go get -d
- name: Install dependencies
run: |
go install github.com/swaggo/swag/cmd/[email protected]
go get -d
- name: Build
shell: pwsh
run: ./build.ps1
- name: Build
shell: pwsh
run: ./build.ps1

- uses: actions/[email protected]
with:
name: artifact
path: ./bin/*
- uses: actions/[email protected]
with:
name: artifact
path: ./bin/*

release:
name: Release
needs: build
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')}}
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/')}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- uses: actions/download-artifact@v4
with:
name: artifact
path: output

- uses: actions/[email protected]
with:
name: artifact
path: output
- name: Create a release
uses: softprops/action-gh-release@v1
with:
files: |
output/**/*
generate_release_notes: true
name: "${{ github.ref_name }}"

- name: Create a release
uses: softprops/action-gh-release@v1
with:
files: |
output/**/*
generate_release_notes: true
name: '${{ github.ref_name }}'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to the Container registry
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
loupeznik/better-wapi:${{ github.ref_name }}
loupeznik/better-wapi:latest
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
loupeznik/better-wapi:${{ github.ref_name }}
loupeznik/better-wapi:latest

0 comments on commit abc6339

Please sign in to comment.