Skip to content

Commit

Permalink
Edits: .github/workflows/release.yml to test
Browse files Browse the repository at this point in the history
  • Loading branch information
rusko124 committed Nov 10, 2023
1 parent 9d7a751 commit 41a88b5
Showing 1 changed file with 54 additions and 49 deletions.
103 changes: 54 additions & 49 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
push:
tags:
- 'v*'
pull_request:
branches:
- test-release
tags:
- 'test'

jobs:
build-release:
Expand All @@ -22,26 +27,26 @@ jobs:
strategy:
matrix:
build:
- linux
- macos
# - linux
# - macos
- windows
include:
- build: linux
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
- build: linux-musl
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-musl
- build: macos
os: macos-12
rust: stable
target: x86_64-apple-darwin
- build: macos-aarch64
os: macos-12
rust: stable
target: aarch64-apple-darwin
# - build: linux
# os: ubuntu-22.04
# rust: stable
# target: x86_64-unknown-linux-gnu
# - build: linux-musl
# os: ubuntu-22.04
# rust: stable
# target: x86_64-unknown-linux-musl
# - build: macos
# os: macos-12
# rust: stable
# target: x86_64-apple-darwin
# - build: macos-aarch64
# os: macos-12
# rust: stable
# target: aarch64-apple-darwin
- build: windows
os: ubuntu-22.04
rust: stable
Expand Down Expand Up @@ -94,34 +99,34 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-docker-image:
name: docker
needs: build-release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build container
run: |
docker build . \
--build-arg "RELEASE=$GITHUB_REF_NAME" \
-t "screenly/cli:$GITHUB_REF_NAME"
- name: Tag container
run: |
docker tag \
"screenly/cli:$GITHUB_REF_NAME" \
"screenly/cli:latest"
- name: Login to DockerHub
if: success() && github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push Docker containers
run: |
docker push "screenly/cli:$GITHUB_REF_NAME"
docker push "screenly/cli:latest"
# build-docker-image:
# name: docker
# needs: build-release
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
#
# - name: Build container
# run: |
# docker build . \
# --build-arg "RELEASE=$GITHUB_REF_NAME" \
# -t "screenly/cli:$GITHUB_REF_NAME"
#
# - name: Tag container
# run: |
# docker tag \
# "screenly/cli:$GITHUB_REF_NAME" \
# "screenly/cli:latest"
#
# - name: Login to DockerHub
# if: success() && github.event_name != 'pull_request'
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Push Docker containers
# run: |
# docker push "screenly/cli:$GITHUB_REF_NAME"
# docker push "screenly/cli:latest"

0 comments on commit 41a88b5

Please sign in to comment.