Merge pull request #338 from slashdevops/fix-issue-322 #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release" | |
# https://help.github.com/es/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | |
on: | |
push: | |
tags: | |
- v[0-9].[0-9]+.[0-9]* | |
env: | |
AWS_REGION: us-east-1 | |
permissions: | |
id-token: write | |
security-events: write | |
actions: write | |
contents: write | |
pull-requests: read | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
id: go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- name: Go version | |
run: | | |
go version | |
- name: Test | |
run: make test | |
build: | |
name: Build Distribution | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
id: go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- name: Go version | |
run: | | |
go version | |
- name: Git Current branch name (Version) | |
run: | | |
echo ${{ github.ref_name }} | |
- name: Build Distribution Cross-Platform | |
run: | | |
GIT_VERSION=${{ github.ref_name }} make build-dist | |
- name: Upload Distribution files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: ./dist/ | |
create-github-release: | |
name: Create Github Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go 1.x | |
id: go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- name: Go version | |
run: | | |
go version | |
- name: Docker Version | |
run: | | |
docker version | |
- name: Git Current branch name (Version) | |
run: | | |
echo ${{ github.ref_name }} | |
- name: Download Distribution files | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: ./dist/ | |
- name: Build Distribution zip Assets | |
run: | | |
GIT_VERSION=${{ github.ref_name }} make build-dist-zip | |
- name: Create Release | |
id: create-github-release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
# body: | | |
# See the file: CHANGELOG.md | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
dist/assets/** | |
container_image: | |
name: Create and Publish Container Image | |
needs: create-github-release | |
uses: slashdevops/idp-scim-sync/.github/workflows/container-image.yml@main | |
secrets: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
GH_USER: ${{ secrets.GH_USER }} | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | |
AWS_OIDC_ROLE_TO_ASSUME: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} | |
aws_sam: | |
name: Create and Publish AWS SAM Serverless Application | |
needs: create-github-release | |
uses: slashdevops/idp-scim-sync/.github/workflows/aws-sam.yml@main | |
secrets: | |
AWS_OIDC_ROLE_TO_ASSUME: ${{ secrets.AWS_OIDC_ROLE_TO_ASSUME }} | |
SAM_APP_BUCKET: ${{ secrets.SAM_APP_BUCKET }} |