Skip to content

Add deploy job

Add deploy job #9

Workflow file for this run

name: Build Swift
on: [workflow_dispatch]
jobs:
build-swift-armv7:
name: Build Swift
runs-on: ubuntu-latest
container: orobio/swift-armv7-build:5.10
timeout-minutes: 480
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Swift Version
run: swift --version
- name: Build
run: |
export SWIFT_NATIVE_PATH=/opt/swift/5.10/usr/bin
export SRC_ROOT=$GITHUB_WORKSPACE
./build.sh
- name: Archive Swift Build artifacts
uses: actions/upload-artifact@v3
with:
name: swift-armv7
path: ./workspace/build/swift-armv7.tar.gz
deploy:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Download Swift Build artifacts
uses: actions/download-artifact@master@v3
with:
name: swift-armv7
path: swift-armv7-cross-bullseye-docker/swift-armv7.tar.gz
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: swift-armv7-cross-bullseye-docker
file: swift-armv7-cross-bullseye-docker/Dockerfile
push: true
tags: orobio/swift-armv7-cross-bullseye:latest