Skip to content

Build artifact

Build artifact #11

Workflow file for this run

name: 'build'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- benchmarking
jobs:
build-devcontainer:
runs-on: ubuntu-latest
outputs:
imageName: ${{ steps.imageName.outputs.imageName }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: set lower case owner name
id: imageName
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
echo "imageName=ghcr.io/${OWNER,,}/r-compile-server" >>${GITHUB_OUTPUT}
env:
OWNER: '${{ github.repository_owner }}'
- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/${{ env.OWNER_LC }}/r-compile-server
cacheFrom: ghcr.io/${{ env.OWNER_LC }}/r-compile-server
push: always
artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build artifact
uses: devcontainers/[email protected]
with:
imageName: ${{ needs.build-devcontainer.outputs.imageName }}
cacheFrom: ${{ needs.build-devcontainer.outputs.imageName }}
push: never
runCmd: cd server ; mvn --batch-mode --update-snapshots package
- run: mkdir staging && cp target/*.jar staging
working-directory: server
- name: Upload snapshot as artifact
uses: actions/upload-artifact@v3
working-directory: server

Check failure on line 56 in .github/workflows/devcontainer.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/devcontainer.yml (Line: 56, Col: 9): Unexpected value 'working-directory' .github/workflows/devcontainer.yml (Line: 63, Col: 9): Unexpected value 'uses'
with:
name: snapshot
path: target/*-SNAPSHOT.jar
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
working-directory: server
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
test:
runs-on: ubuntu-latest
needs: build-devcontainer
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# See https://github.com/devcontainers/ci/blob/main/docs/github-action.md
- name: Run tests in the dev container task
uses: devcontainers/[email protected]
with:
imageName: ${{ needs.build-devcontainer.outputs.imageName }}
cacheFrom: ${{ needs.build-devcontainer.outputs.imageName }}
push: never
runCmd: cd server; mvn --batch-mode --update-snapshots test
verify:
runs-on: ubuntu-latest
needs: build-devcontainer
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run linters in the container task
uses: devcontainers/[email protected]
with:
imageName: ${{ needs.build-devcontainer.outputs.imageName }}
cacheFrom: ${{ needs.build-devcontainer.outputs.imageName }}
push: never
runCmd: cd server; mvn --batch-mode --update-snapshots verify