diff --git a/.github/actions/install-skopeo/action.yml b/.github/actions/install-skopeo/action.yml new file mode 100644 index 0000000..e07648a --- /dev/null +++ b/.github/actions/install-skopeo/action.yml @@ -0,0 +1,34 @@ +name: Install Skopeo +description: Install Skopeo from source on ubuntu runner + +inputs: + version: + description: The Skopeo version to install + default: v1.14.3 + required: false + repo: + description: The Skopeo repository + default: github.com/containers/skopeo + required: false + +outputs: + result: + description: Did the installation succeed? + value: ${{ steps.result.outputs.result == 0 && true || false }} + +runs: + using: composite + steps: + + - name: Install Skopeo + id: result + run: | + sudo apt-get -y update + sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config go-md2man + sudo mkdir -p $GOPATH/src/${{ inputs.repo }} + sudo git clone --depth 1 -b ${{ inputs.version }} https://${{ inputs.repo }} $GOPATH/src/${{ inputs.repo }} + pushd $GOPATH/src/${{ inputs.repo }} && sudo make install + popd + skopeo --version + echo "result=$?" >> $GITHUB_OUTPUT + shell: bash diff --git a/.github/workflows/publish-opentracing.yml b/.github/workflows/publish-opentracing.yml index cd7de51..8c50b6d 100644 --- a/.github/workflows/publish-opentracing.yml +++ b/.github/workflows/publish-opentracing.yml @@ -28,6 +28,9 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Install latest skopeo + uses: ./.github/actions/install-skopeo + - name: Copy image tag run: | skopeo copy -a docker://ghcr.io/pdabelf5/nginx-opentracing:nginx-1.27.0 docker://ghcr.io/nginxinc/k8s-common:nginx-opentracing-1.27.0