diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d28199..f06f96e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: jobs: build-linux-musl: + name: Build Linux MUSL artefact runs-on: ubuntu-latest steps: - name: Checkout @@ -32,6 +33,7 @@ jobs: path: ./target/release/clear-docker-images build-linux-gnu: + name: Build Linux GNU artefact runs-on: ubuntu-latest steps: - name: Checkout @@ -57,6 +59,7 @@ jobs: path: ./target/release/clear-docker-images build-macos: + name: Build MacOS artefact runs-on: macos-latest steps: - name: Checkout @@ -81,12 +84,47 @@ jobs: name: x86_64-apple-darwin path: ./target/release/clear-docker-images + container-images: + name: Create and deploy container images + runs-on: ubuntu-latest + steps: + - name: Setup Earthly + uses: earthly/actions-setup@v1 + with: + version: "latest" + + - name: Checkout + uses: actions/checkout@v3 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Get current tag + id: tags + run: echo ::set-output name=CURRENT_TAG::${GITHUB_REF/refs\/tags\//} + + - name: build and push + run: earthly --build-arg VERSION=${{ steps.tags.outputs.CURRENT_TAG }} --build-arg DOCKER_IMG=datahearth/clear-docker-images --build-arg GHCR_IMG=ghcr.io/datahearth/clear-docker-images --push +build-images + release: + name: Create release and upload artefacts runs-on: ubuntu-latest needs: [build-macos, build-linux-gnu, build-linux-musl] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + with: + fetch-depth: 0 - run: mkdir -p binaries