Build AWS EFS Utils .deb package. #4
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 AWS EFS Utils .deb package. | |
# Run this workflow every time a new commit pushed to your repository | |
on: | |
workflow_dispatch | |
jobs: | |
# Set the job key. The key is displayed as the job name | |
# when a job name is not provided | |
build-deb: | |
# Name the Job | |
name: Build the AWS EFS utils deb | |
# Set the type of machine to run on | |
runs-on: ubuntu-latest | |
steps: | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build .deb file | |
run: | | |
sudo apt-get install binutils -y | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '[email protected]' | |
export CURRENT_TAG=$(git tag --sort=-committerdate | head -1) | |
git clone https://github.com/aws/efs-utils | |
cd efs-utils | |
export THIS_TAG=$(git tag --sort=-committerdate | head -1) | |
git checkout "$THIS_TAG" | |
/bin/sh build-deb.sh | |
cd .. | |
if [ ! "$CURRENT_TAG" = "$THIS_TAG" ]; then git tag "$THIS_TAG" -m "$THIS_TAG"; fi | |
- name: Publish package | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: efs-utils/build/*.deb | |
tag: ${{ github.ref }} | |
overwrite: true |