|
| 1 | +name: Build fcode-utils |
| 2 | + |
| 3 | +on: [push, workflow_dispatch] |
| 4 | + |
| 5 | +env: |
| 6 | + REGISTRY: ghcr.io |
| 7 | + IMAGE_NAME: ${{ github.repository }} |
| 8 | + |
| 9 | +jobs: |
| 10 | + build-x86_64: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + name: fcode-utils for x86_64 |
| 13 | + steps: |
| 14 | + - name: Checkout fcode-utils |
| 15 | + uses: actions/checkout@v2 |
| 16 | + |
| 17 | + - name: Log in to the Container registry |
| 18 | + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 |
| 19 | + with: |
| 20 | + registry: ${{ env.REGISTRY }} |
| 21 | + username: ${{ github.actor }} |
| 22 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 23 | + |
| 24 | + - name: Extract metadata (tags, labels) for Docker |
| 25 | + id: meta |
| 26 | + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 |
| 27 | + with: |
| 28 | + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
| 29 | + |
| 30 | + - name: Build fcode-utils |
| 31 | + uses: docker://ghcr.io/openbios/fcode-utils-builder:master |
| 32 | + with: |
| 33 | + args: "bash -c \"mkdir -p $(pwd)/build-$(uname -m) && make && make DESTDIR=$(pwd)/build-$(uname -m) install\"" |
| 34 | + |
| 35 | + - name: Copy localvalues |
| 36 | + uses: docker://ghcr.io/openbios/fcode-utils-builder:master |
| 37 | + with: |
| 38 | + args: "bash -c \"cp -R localvalues build-$(uname -m)\"" |
| 39 | + |
| 40 | + - name: Store x86_64 artifacts |
| 41 | + uses: actions/upload-artifact@v2 |
| 42 | + with: |
| 43 | + name: fcode-utils-x86_64 |
| 44 | + path: | |
| 45 | + build-x86_64 |
| 46 | +
|
| 47 | + - name: Build and push Docker image |
| 48 | + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc |
| 49 | + with: |
| 50 | + context: . |
| 51 | + file: docker/Dockerfile |
| 52 | + push: true |
| 53 | + tags: ${{ steps.meta.outputs.tags }} |
| 54 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments