Skip to content

Commit

Permalink
ci: added test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Jul 11, 2023
1 parent fb1e67b commit 86ff27d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 54 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Pr
# name: Pr

on: [pull_request]
# on: [pull_request]

concurrency:
group: ${{ github.pr_workflow }}-${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.pr_workflow }}-${{ github.ref }}
# cancel-in-progress: true

permissions:
contents: read
# permissions:
# contents: read

jobs:
build:
uses: ./.github/workflows/release.yaml
secrets: inherit
# jobs:
# build:
# uses: ./.github/workflows/release.yaml
# secrets: inherit
86 changes: 43 additions & 43 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Release
# name: Release

on:
push:
tags:
- v*
# on:
# push:
# tags:
# - v*

permissions:
contents: write
# permissions:
# contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true


jobs:
release-iso-image:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v3
- name: create .netrc file
env:
REPO_USER: ${{ secrets.REPO_USER }}
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
shell: bash
run: |
echo "machine github.com" > .netrc
echo " login $REPO_USER" >> .netrc
echo " password $REPO_TOKEN" >> .netrc
echo "machine api.github.com" >> .netrc
echo " login $REPO_USER" >> .netrc
echo " password $REPO_TOKEN" >> .netrc
- uses: earthly/actions-setup@v1
- run: ./earthly --ci --push -P --output +build-all-images --PE_VERSION=${{ github.ref_name }}
- run: |
if [[ "${{ github.ref }}" =~ .*-.*$ ]]; then
echo "IS_PRERELEASE=true" > $GITHUB_ENV
fi
- uses: softprops/action-gh-release@v1
with:
files: build/*
prerelease: ${{ env.IS_PRERELEASE }}
generate_release_notes: true
# jobs:
# release-iso-image:
# runs-on: ubuntu-latest
# steps:
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - uses: actions/checkout@v3
# - name: create .netrc file
# env:
# REPO_USER: ${{ secrets.REPO_USER }}
# REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
# shell: bash
# run: |
# echo "machine github.com" > .netrc
# echo " login $REPO_USER" >> .netrc
# echo " password $REPO_TOKEN" >> .netrc
# echo "machine api.github.com" >> .netrc
# echo " login $REPO_USER" >> .netrc
# echo " password $REPO_TOKEN" >> .netrc
# - uses: earthly/actions-setup@v1
# - run: ./earthly --ci --push -P --output +build-all-images --PE_VERSION=${{ github.ref_name }}
# - run: |
# if [[ "${{ github.ref }}" =~ .*-.*$ ]]; then
# echo "IS_PRERELEASE=true" > $GITHUB_ENV
# fi
# - uses: softprops/action-gh-release@v1
# with:
# files: build/*
# prerelease: ${{ env.IS_PRERELEASE }}
# generate_release_notes: true
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ env:
GITHUB_TOKEN: ${{ github.token }}
LINT_VERSION: "1.25.1"

concurrency:
group: cli-${{ github.pr_workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
test:
Expand Down

0 comments on commit 86ff27d

Please sign in to comment.