Merge pull request #13 from FlagBrew/dependabot/go_modules/golang.org… #8
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: Build and Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build Docker image | |
run: | | |
docker build -t myapp . | |
- name: Create container and extract | |
run: | | |
mkdir -p ./app | |
docker create --name extract myapp | |
docker cp extract:/app/coreapi ./app/coreapi | |
docker cp extract:/app/cc ./app/cc | |
docker rm extract | |
- name: Archive release | |
run: tar -czvf output.tar.gz ./app | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: run-${{ github.run_number }}-${{ github.sha }} | |
name: Build ${{ github.sha }} | |
draft: false | |
prerelease: false | |
files: output.tar.gz |