Bump docker/setup-buildx-action from 2 to 3 #12
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: Continuous Integration | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
tags: | |
- '**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-run-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository contents | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build binary | |
run: | | |
docker build --tag lustre_exporter:binary -f docker/Dockerfile . | |
- name: Build rpm | |
run: | | |
docker build -t lustre_exporter:rpm -f docker/RPM-Dockerfile . | |
- name: Extract binary | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
docker run --rm -v $PWD:/cpy lustre_exporter:binary | |
sudo chown -R $USER:$GROUP build | |
- name: Upload binary | |
uses: actions/upload-artifact@v4 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
name: lustre-exporter Binary ${{ github.ref_name }} | |
path: build/ | |
- name: Extract rpm | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
sudo rm -rf build | |
docker run --rm -v $PWD:/rpm lustre_exporter:rpm | |
sudo chown -R $USER:$GROUP build | |
- name: Upload RPM | |
uses: actions/upload-artifact@v4 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
name: lustre-exporter RPM ${{ github.ref_name }} | |
path: build/ |