Code Monkey home page Code Monkey logo

starter-workflows's Introduction

Starter Workflows

These are the workflow files for helping people get started with GitHub Actions. They're presented whenever you start to create a new GitHub Actions workflow.

If you want to get started with GitHub Actions, you can use these starter workflows by clicking the "Actions" tab in the repository where you want to create a workflow.

Directory structure

Each workflow must be written in YAML and have a .yml extension. They also need a corresponding .properties.json file that contains extra metadata about the workflow (this is displayed in the GitHub.com UI).

For example: ci/django.yml and ci/properties/django.properties.json.

Valid properties

  • name: the name shown in onboarding. This property is unique within the repository.
  • description: the description shown in onboarding
  • iconName: the icon name in the relevant folder, for example, django should have an icon icons/django.svg. Only SVG is supported at this time. Another option is to use octicon. The format to use an octicon is octicon <<icon name>>. Example: octicon person
  • creator: creator of the template shown in onboarding. All the workflow templates from an author will have the same creator field.
  • categories: the categories that it will be shown under. Choose at least one category from the list here. Further, choose the categories from the list of languages available here and the list of tech stacks available here. When a user views the available templates, those templates that match the language and tech stacks will feature more prominently.

Categories

  • continuous-integration
  • deployment
  • testing
  • code-quality
  • code-review
  • dependency-management
  • monitoring
  • Automation
  • utilities
  • Pages
  • Hugo

Variables

These variables can be placed in the starter workflow and will be substituted as detailed below:

  • $default-branch: will substitute the branch from the repository, for example main and master
  • $protected-branches: will substitute any protected branches from the repository
  • $cron-daily: will substitute a valid but random time within the day

How to test templates before publishing

Disable template for public

The template author adds a labels array in the template's properties.json file with a label preview. This will hide the template from users, unless user uses query parameter preview=true in the URL. Example properties.json file:

{
    "name": "Node.js",
    "description": "Build and test a Node.js project with npm.",
    "iconName": "nodejs",
    "categories": ["Continuous integration", "JavaScript", "npm", "React", "Angular", "Vue"],
    "labels": ["preview"]
}

For viewing the templates with preview label, provide query parameter preview=true to the new workflow page URL. Eg. https://github.com/<owner>/<repo_name>/actions/new?preview=true.

Enable template for public

Remove the labels array from properties.json file to publish the template to public

starter-workflows's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

starter-workflows's Issues

actions how to support Third party CI tool(such as sonar)

I used travis CI.
such as this code:
addons:
sonarcloud:
organization: "freeeyes-github"
token:
secure: "XXXXX"
Actions support does not support such syntax?
Integrate third-party CI detection tools to provide tokens for third-party tools๏ผŸ
thinks.

BUG: Merging on branch master actually rebuilds other branches as well.

I think there is a bug impacting on.

scenario

  • I'm working on edge branch
  • I do a change commit & push
  • Merge to master branch & push

The issue

Github actions CI builds both master and edge branches at the same time. In my YAML, the rule is clear, build master (and nothing else).

Also, the same behavior happen when I merge code from master into edge.

It's very important in my case as:

  • I want to push edge tag to my docker registry for any branches (but not master)
  • I want to push stable tag to my docker registry on for commits on master.

screenshot

Screen Shot 2019-09-02 at 2 55 15 PM

You can checkout my repo here.

[node.js] on push, check out PR's target branch, instead of master

Sorry I probably miss something, but I've a question about

- uses: actions/checkout@master

The starter workflow for Node.js CI includes the action to checkout the master branch. That makes my tests fail, because there is no package.json in the master branch yet, it should test against the PRs target branch instead

https://github.com/octokit/core.js/pull/2/checks?check_run_id=189082987#step:4:1

Android workflow fails for SDK 29

Hello,
While testing the android workflow I noticed the build will fail if the app targets API 29. I see the following build error:

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
      platforms;android-29 Android SDK Platform 29
   The SDK directory is not writable (/usr/local/lib/android/sdk)

Here's a link to the failed build: https://github.com/ncipollo/mtg-league-android/commit/5b7b8d2f85c0a28d2a98d5908fe02d6b72a671c7/checks

When I downgraded my app to target API 28 everything was ๐Ÿ‘Œ

Example workflow that commits and pushes to github

This is a request to add a workflow example that commits to a branch and then pushes to it. Currently, there seems to be no examples showing how to do this.

My use case is that on each change to master, I run sphinx to automatically generate docs, and then push to gh-pages.

This worked before using a ssh key on e.g. appveyor. But when porting I wanted to see if I can just use the GITHUB_TOKEN for this, so I set

env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

And

git config --global user.email "[email protected]"
git config --global user.name "My Name"

and then tried to push. Unfortunately, I then get a fatal: could not read Username for 'https://github.com': No such device or address error.

Maven repositories in pom.xml

I have specified snapshot/milestone repositories in my pom.xml as follow

 <repositories>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/libs-snapshot-local</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/libs-milestone-local</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

But these repositories are not used while I run goal mvn package, due to which I'm getting below error, whereas same maven goal executes successfully on local machine.

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.springframework.cloud:spring-cloud-gcp-dependencies:pom:1.2.0.BUILD-SNAPSHOT @ line 34, column 25
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.knoje:knoje-com-app:1.0.0-SNAPSHOT (/home/runner/work/knoje-dot-com/knoje-dot-com/pom.xml) has 1 error
[ERROR]     Non-resolvable import POM: Could not find artifact org.springframework.cloud:spring-cloud-gcp-dependencies:pom:1.2.0.BUILD-SNAPSHOT @ line 34, column 25 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
##[error]Process completed with exit code 1.

Haskell stack support

I tried to use haskell template, but my project was stack and failed.
How about support build with stack when to be failed cabal install.
Sample below uses if for each cabal steps(but sent mail as failed.)

    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies
      run: cabal install --only-dependencies --enable-tests    
    - name: Install stack
      if: failure()
      run: |
        curl -sSL https://get.haskellstack.org/ | sh
        stack setup
    - name: Build
      run: |
        cabal configure --enable-tests
        cabal build
    - name: Build with stack
      if: failure()
      run: stack build
    - name: Run tests
      run: cabal test
    - name: Run tests with stack
      if: failure()
      run: stack test

Animated gradient border uses 30% CPU

The animated gradient border on the 'New Workflow' page consistently takes up about 30% of my intel i7. Does this animation signify any background process that is running?

Here's what I am talking about
image

<div class=" .... anim-rainbow">
animation: MakeItRainbow ....

Also hiding the div reduces the CPU usage.

How to switch the context of command execution

Hello, I am trying to use the github action to build the docker image and push it to dockerhub. But I have encountered a problem and don't know how to solve it. You know that xx.yml is under .github/workflows/, and my source code is at the same level as the .github folder. So I want to know how to switch context to my source code location.
Please help me thanks.

MSY2/MINGW example workflow

See msys2/setup-msys2 for an up-to-date and actively maintained solution.


Please, provide an example workflow to build MSYS2/MINGW packages with makepkg-mingw. I am currently using the following steps:

    - name: Install MSYS2
      run: choco install msys2
    - uses: actions/checkout@v1
    - name: Build and (hopefully) install package
      run: C:\tools\msys64\usr\bin\bash -lc "./msys2-mingw/run.sh -b"
      env:
        HOME: ${{ runner.workspace }}/myrepo
        MINGW_INSTALLS: ${{ matrix.task.installs }}
        CI: true
    - name: Test package
      run: C:\tools\msys64\usr\bin\bash -lc "source /usr/bin/shell $MINGW_INSTALLS; ./msys2-mingw/run.sh -t"
      env:
        HOME: ${{ runner.workspace }}/myrepo
        MINGW_INSTALLS: ${{ matrix.task.installs }}
        CI: true

However, this is not ideal, because:

  • Installing MSYS2 takes 4-5 minutes.
  • Repeating the envvars in both tasks is redundant.
  • I did not find how to use the following syntax:
     run: |
        commandA
        commandB

About Qt enviornment?

Is there support of Qt env available?
I wanted to build my Qt c++ application in GithubAction but it's quite complicated to set up a Qt environment "by hand".

Improving the C++ Starter Workflow

There's a couple of issues with the C++ starter workflow:

  1. The template says it's for building a project with Make, but it's specifically targeted to projects which use Autotools as their build system, not bare Makefiles.
  2. Few modern open source projects use Autotools: CMake is the de facto standard build system for C++ projects these days, especially cross-platform ones.

My suggestion would be to make the C++ starter workflow use CMake instead and potentially supply an Autotools-specific starter workflow as an additional option.

Swift template

Hopefully we'll see also more Swift related templates (and package registry support) in the next 90+ days. Keep it up GitHub. โค๏ธ

Using expression as docker image for action

First, I apologize if this is not the proper venue for this kind of question.

I'm trying to create an action that runs in a docker image which is given in an input parameter, but it seems the expression is not working:

inputs: 
  docker-image:
    description: 'A dockerhub image with a particular tool in its $PATH'

runs:
  using: 'docker'
  image: 'docker://${{ inputs.docker-image }}'
  args: [ 'tool' ]

This is done to test this tool in several custom environments prepared as dockerhub images. The error I get is:

##[error](Line: 16, Col: 10): Unrecognized named-value: 'inputs'. Located at position 1 within expression: inputs.docker-image

The same expression works, e.g., in the args: value.

I have tested that I can work around this by pulling/running these docker images in a workflow (even using a matrix configuration), so the issue is relatively minor. Still, I wonder if this should work or if there is a good reason why this isn't a good idea.

Can't use HOME variable for windows

As noted here I should be able to use the HOME variable to get the home folder location.

So in my script, I do the following:

name: Rust

on:
  push:
    branches:
    - master
jobs:
  test:
  build:
    name: Running on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest, windows_latest]
    steps:
    - uses: actions/checkout@v1
      run: ${HOME}/.cargo/bin/cargo build --verbose

Although on windows, I get the error: '${HOME}' is not recognized as an internal or external command,, and on the other OS'ses it just works out fine, any idea how?

Global env variables?

Sorry if this isn't the right place to ask, but how can environment variables be set for the entire workflow?

I'm currently doing this whenever I need my local timezone:

- name: Test
  env:
    TZ: America/New_York
  run: yarn run test

The problem is that I have to do this every time if I need to use my local timezone for anything.

How can this be set on a global level so it works across the entire run?

Workflow stuck 95h

image

The same workflow in a previous execution:

image

The only change between both executions is the addition of the LICENSE file.

I don't know how to provide an ID of those jobs. I cannot locate it in the logs. :-(
Is there any place where I can find the jobs ID to provide them and give you more context info?

Thanks!!

Condition to run a job

I have the following job, which is based on ./ci/python-publish.yml :

  deploy:
    runs-on: ubuntu-latest
    needs: linux
    steps:
    - if: github.event_name == 'release' && github.event.action == 'created'
      uses: actions/checkout@v1
    - if: github.event_name == 'release' && github.event.action == 'created'
      name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: 3.7
    - if: github.event_name == 'release' && github.event.action == 'created'
      name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - if: github.event_name == 'release' && github.event.action == 'created'
      name: Build and deploy to PyPI
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

Instead of repeating if: github.event_name == 'release' && github.event.action == 'created' in each step, I'd like to have it defined for the job. For example:

  deploy:
    runs-on: ubuntu-latest
    needs: linux
    if: github.event_name == 'release' && github.event.action == 'created'
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: 3.7
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and deploy to PyPI
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

Or:

  deploy:
    runs-on: ubuntu-latest
    needs: linux
    on:
      release:
        types: [created]
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: 3.7
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel twine
    - name: Build and deploy to PyPI
      env:
        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*

However, none of these are accepted. Which is the supported syntax for this use case?

/cc @montudor @Julian @chrispat

Example about how to securely login through Docker CLI

Currently, using echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin produces a warning:

WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json.
Login Succeeded
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Please, provide an example workflow, step or action that allows to securely login through Docker CLI.

publish tags matching regex

Hello,

does anyone have an idea how I could get on.push.tags to work?

I'm not sure if regexes are supported at all or if the yaml syntax allows any workaround

name: Publish Github Package Repository

on:
  push:
    tags:
      - /^v\\d+(?!-(alpha|beta))\.\\d+(?!-(alpha|beta))\.\\d+(?!\-(alpha|beta))$/

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
      - run: npm ci
      - run: npm test

  publish-gpr:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://npm.pkg.github.com/
          scope: '@pascalsalesch'
      - run: npm publish
        env:
          NODE_AUTH_TOKEN: ${{secrets.BOT_GITHUB_TOKEN}}

Thank you very much for your help

Alternatively, how could I ensure that 'v*' does not contain -alpha or -beta?

monorepo in actions

Hi

Can't find an example of how to use action in conjunction with monorepo?
Would much appreciate if somebody can post an example of the monorepo.

Ion

Lua template

A Lua template that has luarocks installed would be nice

[node.js] npm publish-gpr failed with error 500

To reproduce, run the publish-gpr workflow on a private repo with gpr successfully configured.

...
npm ERR! code E500
npm ERR! 500 Internal Server Error - PUT https://npm.pkg.github.com/@my-scope%2fmy-repo - Internal Server Error

Use GITHUB_TOKEN to auth in docker.pkg.github.com

Try to publish docker container to docker.pkg.github.com

I got error: Error response from daemon: login attempt to https://docker.pkg.github.com/v2/ failed with status: 401 Unauthorized

name: Deploy

on: [push]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: login
      run: echo ${GITHUB_TOKEN} | docker login -u ${GITHUB_ACTOR} --password-stdin docker.pkg.github.com
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Docs suggest different kind of auth for GPR

The docs here:

You can also use a GITHUB_TOKEN to push packages to the GitHub Package Registry in a GitHub Actions workflow. For more information, see "`GITHUB_TOKEN secret."

https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry#authenticating-to-github-package-registry

and here:

Create an environment variable for each action in your workflow file that needs access to the GITHUB_TOKEN secret

https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret

suggest that the env name is GITHUB_TOKEN which does not work. As shows in this example workflow, it should be NODE_AUTH_TOKEN

Ideally, the correct env vars are documented ๐Ÿ‘

Conda Support

It would be great to support an easy workflow to get started with CI using Conda.

Dockerfile template

I just tested the Dockerfile CI example and it's working good :)

Now, to go all in with Github CI, there are many steps we need to put in place. I feel the template is a bit too thin for people.

Here is my full .travis.yml .

My question

How should we format these step using Github Action?

define vars

before_script:
# define our labels and tags
  - GHOST_VERSION_DOCKERFILE="$(cat Dockerfile | grep GHOST_VERSION= | head -n 1 | grep -o '".*"' | sed 's/"//g')"
  - GHOST_LATEST_RELEASE="$(git ls-remote --tags https://github.com/TryGhost/Ghost.git | cut -d$'\t' -f2 | grep -E '^refs/tags/[0-9]+\.[0-9]+' | cut -d/ -f3 | sort -rV | head -n1)"
  - GHOST_CLI_LATEST_RELEASE="$(git ls-remote --tags https://github.com/TryGhost/Ghost-CLI.git | cut -d$'\t' -f2 | grep -E '^refs/tags/[0-9]+\.[0-9]+' | cut -d/ -f3 | sort -rV | head -n1)"
  - GHOST_VERSION=${GHOST_VERSION_DOCKERFILE}

  - DOCKER_USERNAME="devmtl"
  - DOCKER_REPO_NAME="ghostfire"
  - CONTAINER_NAME="ghostuat"

  - THIS_DATE=$(date +%Y-%m-%d)
  - THIS_SHA_SHORT=$(git rev-parse --short HEAD)

  - IMAGE_SHA_SHORT=${DOCKER_USERNAME}/${DOCKER_REPO_NAME}:${GHOST_VERSION}-${THIS_SHA_SHORT}
  - IMAGE_VERSION=${DOCKER_USERNAME}/${DOCKER_REPO_NAME}:${GHOST_VERSION}
  - IMAGE_STABLE=${DOCKER_USERNAME}/${DOCKER_REPO_NAME}:stable

install:

  - echo "install microscanner Aquasec Scanner ==========>"
  - wget --retry-connrefused --waitretry=1 --read-timeout=5 --timeout=5 --tries=10 https://raw.githubusercontent.com/lukebond/microscanner-wrapper/master/scan.sh && chmod +x scan.sh

  - git clone https://github.com/docker-library/official-images.git ~/official-images
  - echo "Bypass timezone'stest "utc" as we use America/New_York timezone in our image ==========>"
  - sed -i "/utc/d" ~/official-images/test/config.sh

build and run

script:
  - uname -a && echo & echo && echo "BUILD OUR DOCKERFILE FROM HERE ==========>"
  - docker build --build-arg=MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} -t ${IMAGE_SHA_SHORT} .
  - docker run -d --name ${CONTAINER_NAME} -p 2368:2368 -e url=http://localhost:2368 -e NODE_ENV=production ${IMAGE_SHA_SHORT}
  
  - echo & echo && echo "Ensure ${CONTAINER_NAME} is starting ==========>"
  - until $(curl --output /dev/null --silent --head --fail http://localhost:2368); do
      echo & echo && echo "Waiting for ${CONTAINER_NAME} container to run  ==========>";
      sleep 3;
    done
  - curl http://localhost:2368 | grep "The professional publishing platform"

login

# docker hub log in
  - echo ${DOCKER_PASSWORD} | docker login --username ${DOCKER_USERNAME} --password-stdin;

push

after_success:
  - if [ ${TRAVIS_BRANCH} == "master" ] && [ ${DOCKER_REPO_NAME} != "" ] && [ ${DOCKER_USERNAME} != "" ] && [ ${DOCKER_PASSWORD} != "" ]; then

      docker push ${IMAGE_SHA_SHORT};

      docker build --build-arg=MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} -t ${IMAGE_VERSION} . ;
      docker push ${IMAGE_VERSION};

      docker build --build-arg=MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} -t ${IMAGE_STABLE} .;
      docker push "$IMAGE_STABLE";

      docker build --build-arg=MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} -t ${IMAGE_NODE_COMPRESS} --target node-compress . ;
      docker push "${IMAGE_NODE_COMPRESS}";

      docker build --build-arg=MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} -t ${IMAGE_NODE_CORE} --target node-core . ;
      docker push "${IMAGE_NODE_CORE}";

      docker build --build-arg=MICROSCANNER_TOKEN=${MICROSCANNER_TOKEN} -t ${IMAGE_GHOST_BASE} --target ghost-base . ;
      docker push "${IMAGE_GHOST_BASE}";

    fi

Update templates to use @v1 instead of @master

Currently all the templates use the @master tag, we should update all references to the following to use @v1. (e.g. uses: actions/setup-node@v1).

  • actions/checkout
  • actions/download-artifact
  • actions/upload-artifact
  • actions/setup-node
  • actions/setup-python
  • actions/setup-go
  • actions/setup-dotnet
  • actions/setup-ruby
  • actions/setup-java

We might want to wait until things settle a little bit to make this change though, everything will still work fine with the @master tag

Multi-container testing example

Would be nice to have an example of multi container testing as a starter workflow :)

This is hinted upon in the feature page but I've been looking through all the docs but could not find a single item about this.

how to use rm and rsync command in the workflow?

When i deploy a php project, i do these steps.

  1. clone code
  2. composer install
  3. delete some sensitive directories or codes.[i don't know how to delete them when use Github Action.]
  4. exec rsync command to sync the code to multiple linux server.

can someone share a demo actions.yml file ?

Did not find expected key [GITHUB_TOKEN]

Hey.
I added the greetings.yaml starter workflow in my repository. The workflow looks like this:


on: [pull_request, issues]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/first-interaction@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue-message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
        pr-message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'

But everytime it runs, it throws error:

yaml: line 11: did not find expected key

I assume it is not able to find GITHUB_TOKEN. I read this here:

The GITHUB_TOKEN secret is a GitHub App installation token scoped to the repository that contains your workflow. GitHub creates the GITHUB_TOKEN secret for you by default, but you must include it in your workflow file in order for actions to use it. You can use the GITHUB_TOKEN secret to make authenticated GitHub API calls on behalf of an action.

Please help on this

add pandoc project workflow

Pandoc is a universal document converter, and is often used by people who just want to write (pandoc's) markdown document and have them converted and published to a number of outputs.

I think quite a lot of people use this to convert *.md sources in a repo and publish it to GitHub Pages.

A default workflow would be nice for that.

Would be happy to hack that together, it's pretty simple.

Would you accept a PR for that?

How to define env variable?

Hi,

I worked for few hours around the CI aspect of Github actions and the big piece that is missing is about how to define variables.

my yml

name: Docker build CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@master

      - name: Build Docker image
        run: docker build --file Dockerfile --tag devmtl/rclone:2.29.1-2019-08-24-32c812f7 .

      - name: Test docker official
        run: |
          git clone https://github.com/docker-library/official-images.git official-images
          official-images/test/run.sh devmtl/rclone:2.29.1-2019-08-24-32c812f7

what I want to do

Of course, the tag devmtl/rclone:2.29.1-2019-08-24-32c812f7 should be dynamic. I need to:

  • generate the date
  • find the hash from the actual commit

From there, I should be able to generate all the tags required.

See how I do this using Travis:
https://github.com/firepress-org/ghostfire/blob/master/.travis.yml#L45

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.