Bump version to 2.0.2 #22
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: Publish OCI image | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
push_to_registry: | |
name: Push OCI image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
extra_nix_config: | | |
extra-platforms = aarch64-linux | |
- run: | | |
DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Extract metadata (tags, labels) | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: unmojang/drasl | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build and push OCI image | |
env: | |
REFERENCES: ${{ steps.meta.outputs.tags }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
run: | | |
echo "$DOCKERHUB_TOKEN" | buildah login -u "$DOCKERHUB_USERNAME" --password-stdin docker.io | |
buildah manifest create drasl | |
for system in 'x86_64-linux' 'aarch64-linux'; do | |
oci_archive="$(nix build --no-link --print-out-paths ".#oci-cross-$system")" | |
buildah manifest add drasl "docker-archive:$oci_archive" | |
done | |
for reference in $REFERENCES; do | |
buildah manifest push --all -f v2s2 drasl "docker://$reference" | |
done |