Skip to content

Commit

Permalink
Replace ubuntu with alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisonmeister committed Jun 13, 2023
1 parent 0741c3d commit 39713e5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 42 deletions.
57 changes: 18 additions & 39 deletions .github/workflows/octo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

get_octo_cli_version:
get-octo-cli-version:
runs-on: windows-latest
outputs:
VERSION: ${{ steps.choco.outputs.VERSION }}
Expand Down Expand Up @@ -69,57 +69,36 @@ jobs:



# This workflow contains a single job called "build"
build-linux:
# define needs
needs: [get_octo_cli_version]
# The type of runner that the job will run on
needs: [get-octo-cli-version]
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Login to docker
- name: Docker Hub login
env:
USERNAME: ${{ secrets.DOCKER_HUB_USER }}
PASSWORD: ${{ secrets.DOCKER_HUB_PAT }}
run: |
docker login --username $USERNAME --password "$PASSWORD"
# Build ubuntu images
- name: Build the docker 1804 image
- name: Build the alpine docker image
env:
VERSION_NUMBER: ${{ needs.get_octo_cli_version.outputs.VERSION }}
run: docker build ./octo/ubuntu-1804 --tag octopuslabs/gitlab-octocli:$VERSION_NUMBER-ubuntu.1804 --tag octopuslabs/gitlab-octocli:latest-ubuntu.1804
if: ${{ needs.get_octo_cli_version.outputs.CONTINUE == 'Yes' }}
VERSION_NUMBER: ${{ needs.get-octo-cli-version.outputs.VERSION }}
run: docker build ./octo/alpine --tag octopuslabs/gitlab-octocli:$VERSION_NUMBER-alpine --tag octopuslabs/gitlab-octocli:latest-alpine
if: ${{ needs.get-octo-cli-version.outputs.CONTINUE == 'Yes' }}

- name: Push the 1804 image
- name: Push the alpine docker image
env:
VERSION_NUMBER: ${{ needs.get_octo_cli_version.outputs.VERSION }}
VERSION_NUMBER: ${{ needs.get-octo-cli-version.outputs.VERSION }}
run: |
docker push octopuslabs/gitlab-octocli:$VERSION_NUMBER-ubuntu.1804
docker push octopuslabs/gitlab-octocli:latest-ubuntu.1804
if: ${{ needs.get_octo_cli_version.outputs.CONTINUE == 'Yes' }}
docker push octopuslabs/gitlab-octocli:$VERSION_NUMBER-alpine
docker push octopuslabs/gitlab-octocli:latest-alpine
if: ${{ needs.get-octo-cli-version.outputs.CONTINUE == 'Yes' }}

- name: Build the docker 2004 image
env:
VERSION_NUMBER: ${{ needs.get_octo_cli_version.outputs.VERSION }}
run: docker build ./octo/ubuntu-2004 --tag octopuslabs/gitlab-octocli:$VERSION_NUMBER-ubuntu.2004 --tag octopuslabs/gitlab-octocli:latest-ubuntu.2004
if: ${{ needs.get_octo_cli_version.outputs.CONTINUE == 'Yes' }}

- name: Push the 2004 image
env:
VERSION_NUMBER: ${{ needs.get_octo_cli_version.outputs.VERSION }}
run: |
docker push octopuslabs/gitlab-octocli:$VERSION_NUMBER-ubuntu.2004
docker push octopuslabs/gitlab-octocli:latest-ubuntu.2004
if: ${{ needs.get_octo_cli_version.outputs.CONTINUE == 'Yes' }}

build-docker-manifest:
needs: [build-linux, get_octo_cli_version]
needs: [build-linux, get-octo-cli-version]
runs-on: ubuntu-latest

steps:
Expand All @@ -131,16 +110,16 @@ jobs:

- name: Build manifests
env:
VERSION_NUMBER: ${{ needs.get_octo_cli_version.outputs.VERSION }}
VERSION_NUMBER: ${{ needs.get-octo-cli-version.outputs.VERSION }}
run: |
docker manifest create octopuslabs/gitlab-octocli:latest octopuslabs/gitlab-octocli:latest-ubuntu.2004
docker manifest create octopuslabs/gitlab-octocli:$VERSION_NUMBER octopuslabs/gitlab-octocli:$VERSION_NUMBER-ubuntu.2004
if: ${{ needs.get_octo_cli_version.outputs.CONTINUE == 'Yes' }}
docker manifest create octopuslabs/gitlab-octocli:latest octopuslabs/gitlab-octocli:latest-alpine
docker manifest create octopuslabs/gitlab-octocli:$VERSION_NUMBER octopuslabs/gitlab-octocli:$VERSION_NUMBER-alpine
if: ${{ needs.get-octo-cli-version.outputs.CONTINUE == 'Yes' }}

- name: Push manifests
env:
VERSION_NUMBER: ${{ needs.get_octo_cli_version.outputs.VERSION }}
VERSION_NUMBER: ${{ needs.get-octo-cli-version.outputs.VERSION }}
run: |
docker manifest push octopuslabs/gitlab-octocli:latest
docker manifest push octopuslabs/gitlab-octocli:$VERSION_NUMBER
if: ${{ needs.get_octo_cli_version.outputs.CONTINUE == 'Yes' }}
if: ${{ needs.get-octo-cli-version.outputs.CONTINUE == 'Yes' }}
File renamed without changes.
3 changes: 0 additions & 3 deletions octo/ubuntu-2004/dockerfile

This file was deleted.

0 comments on commit 39713e5

Please sign in to comment.