Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #38
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: common_util CI | |
on: | |
create: | |
tags: | |
- '**' | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
env: | |
DOCKER_REPO: docker.pkg.github.com/suburbanembedded/common_util/common_util | |
jobs: | |
build: | |
runs-on: ubuntu-18.04 | |
timeout-minutes: 30 | |
if: github.event_name == 'push' || github.event_name == 'pull_request' | |
steps: | |
- name: clone | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: login to docker.pkg.github.com | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | |
- name: fetch container master | |
run: docker pull $DOCKER_REPO:master || true | |
- name: fetch container for branch | |
run: docker pull $DOCKER_REPO:${GITHUB_REF##*/} || true | |
- name: build container | |
run: docker build --cache-from $DOCKER_REPO:master --cache-from $DOCKER_REPO:${GITHUB_REF##*/} continuous_integration/build --file continuous_integration/build/Dockerfile --tag common_util | |
- name: tag container | |
run: docker tag common_util $DOCKER_REPO:${GITHUB_REF##*/} | |
- name: push container | |
run: docker push $DOCKER_REPO:${GITHUB_REF##*/} | |
- name: build | |
run: ./scripts/build_ci.sh | |
- name: Upload debug artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: common_util-debug | |
path: ${{ github.workspace }}/common_util-debug-${{ github.sha }}.tar.gz | |
- name: Upload release artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: common_util-release | |
path: ${{ github.workspace }}/common_util-release-${{ github.sha }}.tar.gz | |
run_tests: | |
runs-on: ubuntu-18.04 | |
timeout-minutes: 30 | |
needs: build | |
if: github.event_name == 'push' || github.event_name == 'pull_request' | |
steps: | |
- name: Get installer | |
uses: actions/[email protected] | |
with: | |
name: common_util-release | |
- name: Unpack common_util | |
run: tar -xf $GITHUB_WORKSPACE/common_util-release-*.tar.gz | |
- name: Install common_util | |
run: sudo apt-get install ./common_util-0.1.0-Linux.deb | |
- name: Run unit tests | |
run: /usr/bin/common_util_test_runner_linux --gtest_output=xml | |
- name: Upload test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: common_util-release-test_detail | |
path: ${{ github.workspace }}/test_detail.xml | |
release: | |
runs-on: ubuntu-18.04 | |
timeout-minutes: 30 | |
needs: build | |
if: github.event_name == 'create' && github.event.ref_type == 'tag' | |
steps: | |
- name: Get artifact | |
uses: actions/[email protected] | |
with: | |
name: hadoucan-fw-release | |
path: ${{ github.workspace }}/common_util-${{ github.sha }}.tar.gz | |
- name: Mangle name | |
run: mv common_util-${{ github.sha }}.tar.gz common_util-${{ github.sha }}-${{ github.event.ref }}.tar.gz | |
- name: Upload release artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: common_util-release | |
path: ${{ github.workspace }}/common_util-release-${{ github.sha }}-${{ github.event.ref }}.tar.gz |