v5.48.1 #40
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: OCI Image Publish | |
on: | |
workflow_dispatch: null | |
release: | |
types: [ published ] | |
jobs: | |
oci_publish: | |
name: Build and publish the OCI image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v3 | |
- name: setup python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install deps | |
run: make requirements | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # [email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # [email protected] | |
- name: Login to Docker Hub | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # [email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# This is necessary as we want to ensure that version tags | |
# are properly formatted before passing them into the | |
# DockerFile. | |
- name: Get CLI version | |
run: | | |
export CLI_VERSION=$(./version) | |
echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_OUTPUT | |
env: | |
LINODE_CLI_VERSION: ${{ github.event.release.tag_name }} | |
id: cli_version | |
- name: Build and push to DockerHub | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # [email protected] | |
with: | |
context: . | |
file: Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: linode/cli:${{ steps.cli_version.outputs.CLI_VERSION }},linode/cli:latest | |
build-args: | | |
linode_cli_version=${{ steps.cli_version.outputs.CLI_VERSION }} | |
github_token=${{ secrets.GITHUB_TOKEN }} |