fabiochiu/medium-articles huggingface dataset:
The Truth Is — Working Remote Made Me Unhappy
By: Taylor Silva
Tags: Beyourself, Work, Remote Working, Working From Home, Life Lessons

To make it clear, I’m not a digital nomad. I worked for a corporate company when I ended up going remote.

Working remote wasn’t a choice for me, as I’m sure it wasn’t for a lot of people during 2020.

And we all know what kind of shit-show 2020 was.

Before said shit-show, I used to work for a ‘little’ company called Yelp. Maybe you’ve heard of it, maybe you haven’t.

I worked as an Account Executive, a fancy title for sales, and loved it. I called business owners and tried to pitch them. Yeah, I’d get cursed out. I’d get called terrible names. I’d get hung up on. And that motivated me.

OH YEAH, SUSAN? YOU NEVER WANT TO HEAR FROM ME AGAIN? Yeah okay, I’ve heard that 80 times today. Talk to you next week!

It’s the nature of sales, what can I say. We were trained to be relentless sharks.

Not only was the job itself fun, the environment was everything I could ask for at a job. Picture Wolf of Wall Street but instead of stocks… advertising sales. Footballs flying across the office, people hitting the Gong when they made a sale, clapping, and an exuberant amount energy. It was fucking lively.

I lived for that.

And you know what shit on all of that? Coronavirus.
Working From Home — The Impact On Recruitment
By: Russell White
Tags: Recruiting, Work Life Balance, Work, Working From Home

A lot has been written about working from home over the year and with all restrictions on the verge of being lifted, there is a lot of anticipation of the impact of the long-term impact of coronavirus, especially in regards to the working environment and how it will affect work.

It was reported today (17th June 2021) that the government is considering legislation to enshrine in law the right to work from home. Clearly this will require a lot of thought and exemptions (for instance a bus driver can hardly work from home) but the thinking is that employers will have to show it was essential for employees to attend the workplace.

This will have a major impact on how businesses, especially in the service sectors operate. The pandemic and lockdown meant that companies, large and small had to adapt very quickly to keep functioning, improving remote access to company IT systems, establishing flexible call handling procedures, creating robust cyber security, as well as maintaining a cohesive culture through video systems such as Zoom and Teams. From the conversations we have had with clients and candidates alike, in the majority of instances, both employers and employees have adapted well — employers have seen no notable impact on productivity and employees have enjoyed the flexibility and that they have saved a not unsubstantial amount of money, not commuting and buying lunch, even those who saw their salaries reduced at the beginning of the pandemic.

Even if the potential legislation is not passed into statute, the lockdown has proved in the majority of cases that people can function very effectively working from home. Clearly businesses will want to maintain what I would coin ‘team cohesiveness’ and whilst full-time working from home for an individual employer will be rare, hybrid models of one, two or three days a week in the office will emerge. Our experience over the past 6 months or so, suggests that job seekers will actually demand this approach and those businesses that are inflexible will lose out talent to more accommodating companies. In fact companies that take an inflexible approach may struggle to retain their staff to businesses with a more adaptable approach to working from home.

Clearly there will be exceptions. Some employees will want to work 5 days a week in an office, some may prefer to commute 1 day a month — again this will create challenges for companies but one thing is for sure — how businesses operated pre-pandemic will never be the same again and employers will face new tests in how they operate moving forward.
Overcoming The Negative Effects Of Working From Home
By: All The Things Heidi
Tags: Move, Stress Management, Working From Home, Overcome, Mindful

When I started participating in social gatherings with my friends and family and going out in public to somewhat mimic what my old routine used to look like, I started to notice that something wasn’t right with me. I was nervous all the time, I had this overwhelming feeling that something bad was going to happen, and I would suddenly start feeling uneasy for no good reason. What was wrong with me? I was being safe and so was everyone I chose to associate with, and I wasn’t abusing our newfound freedom so what could be the problem? Well, while I was basking in the delight of working from home and staying in my comfort zone, I failed to do two of the most important things, continue regular physical and mental stimulation.

I went from working out, being social, working from home occasionally, and running around all day, every day, to being at home 24hrs a day and 7 days a week because that was all I could do. Although partially true, I could have at least continued to follow my fitness routine from home and stepped outside for some fresh air and a daily walk or run but I didn’t do any of it, for almost a full year. It may seem like common sense but with everything else that was going on I never thought about how not engaging in any physical activity could be so harmful. Regular physical activity is proven to promote several overall health benefits including but not limited to mental and emotional health.

Photo by erica steeves on Unsplash

After realizing that my feelings of anxiousness and panic were due to lack of movement, I did what I always do when I realize that a change needs to be made, I started making moves fast and in this case quite literally.

Walking around my neighborhood every day (1 mile), and tracking my activity on my Apple Watch became my go-to workout.

Meditating was also something that I incorporated into my daily routine; and while walking helped me with physical activity, meditating helped me exercise my mind and manage my anxiety and stress levels.

As I became more concerned with my physical and mental health, I also worked on improving my nutritional health by joining Weight Watchers.

I also discovered that Apple Fitness+ is a great tool to do your workouts at home; I’ll have an article about my experience with that service coming soon.

In addition to being mindful of my physical activity, I also made it a point to start leaving the house more frequently even if it was just to run to my local grocery store to pick something up, or hop in my car and take a ride for a change of scenery.

Photo by Sara Kurfeß on Unsplash

As simple as these changes were, they played a major role in improving my overall well-being and mental state. I can confidently say that I am feeling much better than I did when I was staying at home in my comfort zone. When attempting to establish any new routine or habit, we must remain focused and consistent if we want to see lasting results; if you put your mind to it you can truly overcome any obstacle.
5 Habits to Stay Healthy
By: Ahmed Soliman
Tags: Healthy, Software Engineer, Working From Home, Healthy Living, Remote Work

The day of a software engineer is full of meetings, project work, weird bugs and a LOT of interrupts. So it is very hard to introduce multiple habits/hacks. to the daily routine at once.

Let me take you through them starting from the easy ones..

Drinking Water 🚰

It is obvious that drinking water is important, but sitting all day on a chair staring and diving into thoughts will make you forget about it.

One hack here is this amazing bottle I bought on Amazon. You fill it once and spend the next two hours distressing yourself sipping from it. Alternative to stress balls?

Ergonomic Woking Station 🖥

Neck pain, back pain, incorrect posture .. and the list goes on. An ergonomic chair, standing desk and a posture corrector will do the job. One hack is setting a timer that peep every one hour so you can go for a one minute walk or stand for a while, maybe go fill the bottle you got from the previous point 😄

Eat Right 🥗

I know fast food is the easiest option but maybe try some other alternatives:

Recipe Boxes delivered to your doorstep weekly.

Prepare meals on weekend and refrigerate them to use during work days.

If you cook for yourself, consider looking at food labels to chose the healthy alternatives.

Maybe replace sodas with zero calorie ones or soda water, consider nuts and fruits as a healthier snacking option.

Stay Active 🏋️‍♀️

This is the champion level, specially with working from home mode. If you go to the office, then at least this is an activity. If not try to find three 30 minutes slots (maybe less, you can always start small) over the week and go for any activity that you are interested in. For me I found swimming a very fun activity.

Get Enough Sleep 💤

This is vital to stay focused and protect your mental health, and most importantly improve immune system help fighting covid-19 these days..
I Attended My Son’s Online Class and Here’s What I Found
By: Emili Ismail
Tags: Covid 19, Mental Health, Working From Home, Working Moms

My organization gave us a day off from work to recharge for a better #mentalhealth. I made full use of the Org-given (pun intended) day by attending all my son’s online classes with him. All 8:45 am to 3 pm classes.

That’s right. I went back to school!

Being the rebellious teenager that I was, I sat at the back of the class in my true fashion, just like in this picture.

But this time, I paid full attention in class. By the end of the day, here are my findings:

My kid is easily distracted.

My kid only pays attention and participates when movement is involved (music, physical education.)

My kid needs to learn how to use a laptop. Mute and unmute are still done by his dad.

Girls are more attentive than boys.

Kids like to press the raise hand button and type gibberish and emojis. Despite the countless desperate pleas by the teachers, it kept happening.

Teachers have lots of patience. I had mentally flipped a number of tables on several occasions.

I learn something new (Voice Registers from his music class, making body alphabets from PE class).

I can safely suggest the following:

My kid needs to learn to wear his gaming headphone for class.

Learn how to use a laptop.

Educators need more than cookies as thank you’s on Teacher’s Day.

Then I realized I just clocked out from a one-day field research for a UX client. I mean, empathy should start at home, right? 😅

#mentalwellness #empathy #uxresearch #workingmomlife
AWS Lambda + FastAPI (Serverless Deployment): Complete CI/CD Pipeline Using GitHub Actions
By: Azzan Amin
Tags: AWS Lambda, Ci Cd Pipeline, Python, Github Actions, Fastapi

Let’s build a complete CI/CD workflow using GitHub Actions, FastAPI, AWS Lambda (Serverless Deployment) and AWS S3.

Photo by Manasvita S on Unsplash

Are you burdened with mundane boring and repetitive tasks that delays bringing your magical software product to production? As software/devops engineers focused on bringing our code to life, we all face the same problems where we need to perform tasks that are boring, repetitive and sometimes a total waste of time. For instance, one of them is the process of running the unit tests on various environments and then deploying our software to various delivery platform. The processes takes longer than they should and surely makes our day at work inefficient and unproductive. Have you ever wondered:

How can I automate all these boring repetitive testing and deployment processes?

Do we have any kind of method that could solve these problems?

Don't worry you’re not alone.

I thought about it all the time, till I realized that there is a simple solution to these problems. It is an amazing method in software development world called Continuous Integration and Continuous Deployment(CI/CD).

CI/CD is one of the best practices in software development as it reduces the repetitive process of unit testing and the deployment of the software.

This practice undeniably will help the developers in efficiently automating all the steps required for running the automated tests on the server. Plus, it can continuously deploy the application to the deployment platform once it has passed the automated tests. And yes, it is fully automated.

The good news is, all of these processes can be achieved by using a new feature on Github called GitHub Actions!

In this article, we’ll demonstrate you a simple walkthrough on building a complete CI/CD workflow of FastAPI using GitHub Actions and we’ll deploy the API to AWS Lambda.

Let’s Dive in!
Improving CI/CD pipeline for Android via Fastlane and GitHub Actions
By: Ashwini Kumar
Tags: Ci Cd Pipeline, Android, Fastlane, Github Actions, Automation

Building CI/CD pipeline 🔨 🔧

You can skip this section if you do not have any private libraries.

If your Android app relies on several in-house libraries, you would be probably using JFrog’s Artifactory to manage your repositories served via Maven. While Artifactory is incredible in its own way, you lose out on the principle of a single source of truth. That typically means that if your code repository is on GitHub, you will ideally want all the related packages also available in the same place. This helps in better maintenance and visibility. When you start setting up a CI/CD pipeline on GitHub action, you will face the first blocker as the packages are hosted privately on artifactory via intranet requiring a VPN connection. Here are some out-of-the-box solutions:

Go Public — You can make Artifactory publicly accessible, obviously under the authenticated environment. If the packages are private, why would you want them to be hosted publicly? Also, isn’t it still defeating the idea of a single source of truth? Use Self-Hosted Runners — Github also provides the power to use self-hosted runners to customize the environment according to your workflow needs. Since the environment will be hosted and created according to your needs, you can easily pull out the private libraries while building the app on Github action. This sounds good but fails due to the massive efforts it would require to build and stabilise while still investing time in maintenance of it.

“We can not solve our problems with the same level of thinking that created them”

― Albert Einstein

As mentioned earlier, the aim of the pipeline is to have a cleaner separation of concern with clearer visibility having GitHub as the single source of truth (code, wiki, versioning, changelog, actions, releases, etc.) for your repositories. Proper version/release management, faster deployment and deeper integration with GitHub services will help in running a smoother pipeline and enhance it for future needs.

If you are already publishing your libraries to Artifactory via Maven, it would require little efforts in build.gradle file to start publishing .aar files on GitHub. You can maintain a github.properties that contains github_token and github_username to give the capabilities to publish locally for fallback. The pom file for the .aar packages will also be published under GitHub packages.

Using ./gradlew publish locally, you can test your integration and find that the libraries are properly getting published on GitHub packages under your targeted repository.
GitHub Actions — How To Share Data Between Jobs
By: Georgy Glezer
Tags: JavaScript, Programming, Github, DevOps, Github Actions

There are 2 main ways to share data between jobs in GitHub Actions:

Cache Artifacts

Cache

GitHub provides you an Action called: actions/cache (GitHub Repo), We can use it to upload cache and then download it in different jobs(Docs).

Let’s see a live example and then go over it:

As you can see it is really simple to use, The actions themselves have 3 parameters:

path (required): The file path on the runner to cache or restore. The path can be an absolute path or relative to the working directory.

(required): The file path on the runner to cache or restore. The path can be an absolute path or relative to the working directory. key (required): The key created when saving a cache and the key used to search for a cache. It can be any combination.

(required): The key created when saving a cache and the key used to search for a cache. It can be any combination. restore-keys(optional): An ordered list of alternative keys to use for finding the cache if no cache hit occurred for key .

This action outputs a cache-hit and we can also use it to run actions like this:

As you can see it really simple and straight out of the box, let’s move on to the second one.

Artifacts Upload/Download

Artifacts is a way GitHub Actions provides you to persist files and use them after a run is finished or share it between jobs(Docs).

To create an artifact and use it you will need different actions: Upload And Download.

To upload a file or a directory you just use it like this:

Here you only need to provide 2 parameters:

name : The name you want to give to identify the artifact.

: The name you want to give to identify the artifact. path: The path to the file or to the directory.

Then to download the artifact to use it:
Amazon EC2 Deployment: Complete CI/CD Pipeline using GitHub Actions and AWS CodeDeploy
By: Azzan Amin
Tags: Amazon Ec2, Ci Cd Pipeline, Github, Aws Codedeploy, Github Actions

3. Create IAM Role and Service Role for AWS CodeDeploy

There are two types of IAM roles that need to be created: Instance Role and Service.

Instance Role

In the first step, we need to create the instance role using AWS IAM. This role is important as it gives the proper permission to EC2 to access and read files from S3 buckets.

To create it, go to AWS Management Console and log in using our AWS Account. Then, proceed to IAM in the console and click on Roles. Once we have entered the Roles page, click on Create Role.

We will create roles for EC2 instance, therefore select EC2 as our use case.

Add the following policy:

AmazonEC2RoleForAWSCodeDeploy

Then, give the EC2 role a name and Click on Create Role

Service Role

Next, we need to create the IAM service role which will give the AWS CodeDeploy access and read the EC2 instance tags. Go to the Roles page and then Click on Create Role.

Select EC2 and proceed to add the following policy:

AWSCodeDeployRole

Then, give the service role a name and Click on Create Role. After that, we need to edit the trust relationship of the service role.

In order to do this, we need to go to the Roles page and click on the service role name that we have created.

You will see the trust relationships tab on the next page and click on Edit trust relationships.

Edit the policy document as below:

{

“Version”: “2012–10–17”,

“Statement”: [

{

“Effect”: “Allow”,

“Principal”: {

“Service”: [

“codedeploy.amazonaws.com”

]

},

“Action”: “sts:AssumeRole”

}

]

}

Once edited, click on Update Trust Policy.

All set! Now IAM roles are done.
This Is How I Deploy Next.js into Google Cloud Run with Github Actions
By: Jm Santos
Tags: JavaScript, Programming, Nextjs, Google Cloud Run, Github Actions

Cloud run is a Google service that allows you to deploy a containerized application into the cloud. It also manages your infrastructure by automatically scaling up and down depending on the traffic.

Let’s say your application has no traffic during midnight, it will scale down, and that allows you to reduce the cost of resources. I think this is similar to Heroku Dyno where it sleeps whenever there is no traffic. In other words, you only pay when your code is running.

Due to my limited experience with Cloud Run, I won’t be able to tell you more details and some comparison of this service with other providers. If you are interested in knowing more details here’s a good FAQ to start on.

Dockerizing Next.js

Our first step in deploying Next.js into Cloud Run is to make sure our app is containerized. In this tutorial, I will generate the boilerplate provided by the Next.js team by running this simple command:

$ npx create-next-app --use-npm

For more info about that command, check it out here.

After it generates the boilerplate of our application, let’s add a couple of Docker related files into our application.

$ touch Dockerfile

then the last file is this one:

$ touch .dockerignore

That should make our docker image small and perform a little bit faster.

Our directory should now be like this, plain and simple:

The next step is making sure our containerized application is working locally. Let’s test it by building the docker image and running it. To do that, here are the commands we need:

# Usage: docker build <path> -t <repo_name>:<tag>

$ docker build . -t nextjs-app:latest

The next step is running the image we built

$ docker run -p 3000:3000 nextjs-app
Decorate your pull request with SonarQube and Github Actions
By: Damien Gaillard
Tags: Java, Github, Sonarqube, Github Actions, Pull Request

At Jahia we wanted to automate our SonarQube analysis, and if at the beginning we did not know which tools to use, we rapidly figured that GitHub Actions was the way to go.

Image by WikiImages from Pixabay

We recently changed our Git workflow and therefore we had to adapt some of our tools. We wanted to automatically analyze our entire code when a push happened on a specific branch, as well as analyzing the new code provided by a pull request.

As we are using SonarQube to analyze our code, we had to find a way to include it in our new flow in order to use its code analysis capability.

And Github Actions was the answer to that.

GitHub Actions is the tool you were longing for to automate GitHub related workflows.

It makes it easy to do pretty much anything build, test, analyze your code, or simply prefill pull request/commit data, labels, assignment.

They are written in Yaml and live in your repository, you can use sensitive data (token, password) safely since you can pass those data as secret.
How to deploy a create-react-app with github-actions
By: Christoph Michel
Tags: Github, JavaScript, React, Github Actions

Here’s a quick guide on how to deploy a CRA (create-react-app) to GitHub pages using GitHub actions. We’ll create a GitHub Action workflow that runs the build command and then deploys the build directory by pushing it to the gh-pages branch.

Setup

1. Prefix URLs

GitHub pages urls looks like user.github.io/repo-name , so we need to make sure all our relative URLs are prefixed by /repo-name . Using create-react-app, it's enough to add "homepage": "/repo-name", to the package.json . The build command will automatically take care of the rest.

2. Add deployment key

Deploying to GitHub pages means pushing the build directory to the gh-pages branch. Currently, pushes using default GitHub Actions credentials do not trigger a GitHub pages rebuild. Meaning, we need to set up a deployment key for the repo first that can be used by the GitHub action. I use the same deployment key for the gh-pages deployment actions across all my repos. You can create a new SSH public/private key pair using this command:

cd ~/.ssh

ssh-keygen -t rsa -b 4096 -C "$(git config user.email)" -f gh-pages-actions -N ""

Following the Getting Started section of this gh-pages Action we add a new write-access deployment key** in the /repo/settings/keys section pasting our public key from the .pub file.

We need to make the private key accessible to our GitHub action. To do this add the corresponding secret key in the repo/settings/secrets section. Make sure to name it ACTIONS_DEPLOY_KEY .

GitHub Action

Now all that’s left is to create a new .github/workflows/deploy.yml workflow file and paste the following GitHub action YAML code:

name: Deployment

on:

push:

branches:

- master

jobs:

deploy:

runs-on: ubuntu-latest

strategy:

matrix:

node-version: [12.x]

steps:

- uses: actions/checkout@v1

- name: Use Node.js ${{ matrix.node-version }}

uses: actions/setup-node@v1

with:

node-version: ${{ matrix.node-version }}

- name: Install Packages

run: npm install

- name: Build page

run: npm run build

- name: Deploy to gh-pages

uses: peaceiris/actions-gh-pages@v3

with:

deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}

publish_dir: ./build

On each push to the master branch it performs the following tasks:

Checkout the code from the master push Install Node v12 Run npm install Run npm build which creates the build folder. Deploy the ./build folder to gh-pages using the deploy key in the secrets.ACTIONS_DEPLOY_KEY variable.

To test the deployment process push this workflow file to master.
Searching for existing Github Actions has never been easier! [OUTDATED]
By: Jayjeet Chakraborty
Tags: Singularity, Reproducible Research, Sciops, Popper, Github Actions

With the release of Popper 2.3.0, we are happy to bring to you a searchable catalogue of prebuilt actions that keeps growing. Now you can easily search for different actions built by developers around the globe from within popper.

Note: This feature requires Popper 2.3.0+. If you are not familier with Popper, check out the getting started guide.

What am i talking about?

Let’s say you are building a Github Action workflow using Popper that uses ansible, so you might want to search actions based on ansible. Popper makes this easy for you with its search subcommand. Simply do,

$ popper search ansible

And you might want to go and grab a cup of coffee because for the first time popper search takes a while to fetch all the action metadata from the remote catalogue and cache it locally.

Demonstration of popper search

Popper searches the catalogue of actions and returns the actions relevant to the search keyword. All the subsequent searches will be lightning fast because then popper will search within the cached metadata. The search results are always in the form <org>/<repo>/<path/to/action> .

Additionally, you can tell popper to include the README.md of the action while searching as sometimes the action names might be much descriptive. For example,

$ popper search --include-readme ansible

Once the search is complete, you might want to know more information about the actions you need. For example, you can get the details of the ansible action by doing,

$ popper info popperized/ansible

Demonstration of popper info

The info subcommand displays the contents of the README.md file.

What if the catalogue gets updated?

To get the latest actions and updates from the catalogue, you can always update the local metadata cache while searching or while fetching info by doing,

$ popper search --update-cache <keyword> $ popper info --update-cache <action>

Contributing to the catalogue!

To help the action catalogue become richer, feel free to add action references to this list by sending a pull request to the popper repository. 👍

References

For more about Popper, see our Github project or join our Gitter channel.
GIT for every day use. I think every dev must have heard about…
Tags: Github, Everydaygit, Git, Github Actions

# git clone https://github.com/jaydalayi/resumePortal.git

If you are using SSH instead of HTTPS for git clone:

git@github.com:jaydalayi/resumePortal.git

Usually, I would prefer using SSH method because I feel it’s more secure. You have to setup a SSH Key before you use this method.

2. If you are reading this, you must have completed Step 1. So at this point, all the branches from remote repo will come to your local. Now use the command: git pull origin master (origin refers to the repo since we did not use Fork concept here, “master” refers to the main branch)

3. Depending on your build tool, use mvn clean install or ./gradlew build on Terminal.

4. Once the build is successfull, create a branch to make the changes as per your user story (JIRA board).

git branch -b “Story-123” → git checkout Story-123 → git pull origin master — rebase

Rebasing will bring all the changes from the origin master to your local and applies on top of your commits so far (if you made any).

5. It’s time to push the changes! Use below commands:

git status (Will show what changes you did)

git diff (Will show actual files where you made changes with RED sign (if you removed) and GREEN sign if you added anything)

6. Once you are fine and happy with your changes, it’s time to add them and commit

git add src/main/tempFile.java (look for the path of the file using git status command above)

DON’T USE : git add — all which will add all the files at once even though you can. Add individual file always. Remember!!

7. Commiting the changes:

git commit -m “Story-123: hurray made some progress”

8. Push the changes :

git push origin Story-123 (this will push your changes to origin (remote ) repository not to the master)

Recommended: git pull origin master — rebase (Always do this before you push your changes, remember master is just a branch)

9. Time to leave the Terminal Window and Go the github website.

If you are successfull until this point which I think you won’t without resolving some errors with Git, go to github.com or your company specific github website.

Hurray!! You’ll see some new thing your website asking you to create a MergeRequest or PullRequest. Go ahead and click that, enter all the details and Submit the MergeRequest/ PullRequest.

Finally, it’ll go to your peers for code review (if you assign it to them using @Name) or Look for Assign to dropdown menu and select the names from the dropdown.

At this point, we are done with GIT. Happy Reading!
Automate GitHub Container Registry deployments with GitHub Actions
By: Pratik Chowdhury
Tags: Docker, Github Container Registry, Github Actions

Creating a container image

Let us create a very simple container image.

What does this image do?

For every argument this image receives, it outputs the argument to the screen.

Just like an echo command.

We use Alpine because the image sizes are small and hence downloads are faster.

Of course your image can be highly complex.

Writing a GitHub Action

Let me first show you the entire GitHub Actions and then we can go through it step by step.

Looks simple right?

Triggering the action

Our current action has been designed to simplify triggering via workflow_dispatch using GitHub CLI or using the GitHub Web based interface.

Again the focus here is on complete simplicity. You can trigger on :-

Push Pull Request Release On a schedule (Build image every week) etc.

Thus making it easy to configure.

Setting things up

Based on the repository, we can say

Check out the repository setup-qemu action can be useful if you want to add emulation support with QEMU to be able to build against more platforms. setup-buildx action will create and boot a builder using by default the docker-container builder driver. This is not required but recommended using it to be able to build multi-platform images, export cache, etc.

Again both these steps are not mandatory. In our case, neither are required. But it is recommended that you use them in case you do indeed need them. Step 2 can be skipped if not needed.

Logging in

We can login to GitHub Container Registry using

Notice how we do not have to configure a single secret in the GitHub Repository and how everything is handled for us. The entire process is both seamless and effortless.

This convenience is one of the major advantages of using GitHub Actions with GitHub Container Registry.

Building

As you can see building is fairly easy. All we have to do is specify the tag of the image. This is similar to how it would have worked offline as well.

Deploy with release tagged

To deploy with the release tagged, instead of a fixed string latest in a repo triggered by on release, you can use

ghcr.io/${{ github.repository }}/echo:${{ github.event.release.tag_name }}

What is the tag format?

The tag starts with ghcr.io which is the GitHub Container Registry website. It then contains the name of the repository. For example:- github/example. And then it will contain the name of our image.

This allows us to deploy multiple images to the same repository.

Further Configuration

For further configuration, you can check out the documentation page of the GitHub Action itself.

The page deals with adding support for Caching etc. which you might need based on your project requirements.

Usage

You can use this docker image easily by

View Sample Repo

You can find it here.
AWS ECS로 서비스 환경 구축하기(3)-자동 배포 설정. 이 글은 컨테이너 기반 서비스 환경을 구축하는 내용을 다루고 있으며…
Tags: Aws Ecs, Github Actions, Container Orchestration, DevOps

on:

push:

branches:

- develop # 해당 브랜치에 PUSH 됐을 때 실행



name: Web Server CI/CD # Action 이름



jobs:

deploy:

name: Deploy

runs-on: ubuntu-latest # 자동 배포가 실행 된 OS 이미지 (macos도 제공 됨)



steps:

- name: Checkout # 현재 Repo의 소스를 clone

uses: actions/checkout@v2



- name: Configure AWS credentials # AWS 인증

uses: aws-actions/configure-aws-credentials@v1

with:

aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}

aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

aws-region: ap-northeast-2



- name: Login to Amazon ECR # AWS ECR 로그인

id: login-ecr

uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR # Docker 이미지 빌드, 태깅 후 AWS ECR에 PUSH

id: build-image

env:

ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}

ECR_REPOSITORY: project-name/service # AWS ECR 이름

IMAGE_TAG: ${{ github.sha }}

run: |

# Build a docker container and

# push it to ECR so that it can

# be deployed to ECS.

docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f ./Dockerfile .

docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"



- name: Fill in the new image ID in the Amazon ECS task definition # ECS 작업 정의 생성

id: task-def

uses: aws-actions/amazon-ecs-render-task-definition@v1

with:

task-definition: task-definition.json # 작업 정의 템플릿 파일 이름

container-name: service # 컨테이너 이름

image: ${{ steps.build-image.outputs.image }}



- name: Deploy Amazon ECS task definition # 작업 정의 파일을 ECS 서비스에 반영

uses: aws-actions/amazon-ecs-deploy-task-definition@v1

with:

task-definition: ${{ steps.task-def.outputs.task-definition }}

service: container-name # 컨테이너 이름

cluster: cluster-name # 클러스터 이름

wait-for-service-stability: true
iOS Modularization + Github Actions
Tags: iOS, Github Actions

This article covers github action workflow that can elevate the modularization development process.

TL;DR: Auto Tagging using Github Action.

Since our monolith project structure eats our building time like anything. It takes an avg of 15mins on the clean rebuild process. After spending a good time researching, we started adopting modularization architecture, that can chunk our project by modules/features.

InterfaceModule

AuthenticationModule (login/signUp)

SessionModule (me and my information)

ContainerModule (a base project)

Tab Modules (depends on the project)

MoreModule

ProfileModule

INTERFACE Module contains only interfaces (protocols in swift) that help to organize feature/tab modules on ContainerModule to create a new flavor(app). Since we kept InterfaceModule as a separate repository, and all teams will be pushing the updates very frequently, we were forced to create a new tag on every successful merge, so that other modules make use this the changes by pointing to a particular tag with swift package manager. Working as a team, manual tagging helps to create tags to a certain limit. The alternative and effective way would be auto-tagging.

Bitrise CI/CD ?

We are using Bitrise (CI/CD) for the main project that helps to

Unit Testing

Archiving new flavor

Deploying to AppStore

Tagging, Creating Release Notes

Collecting SonarQube CodeCoverage

Fastlane integration for other internal processes.

But the problem with using Bitrise for simple tagging on the InterfaceModule requires so much integration from scratch. Adopting Github Action yields good results.

Github Action

On the successful merge of the pull requests, the following github action will be triggered to create a new tag.

Setup can be done once adding PAT (Personal AccessToken) under module repository secrets.

#TAG

Any commit message that includes #major , #minor , #patch will trigger the respective version bump. If two or more are present, the highest-ranking one will take precedence. If no tag is contained in the commit messages, it will bump whichever DEFAULT_BUMP is set to (which is patch by default)

#Major : 1.0.0

: 1.0.0 #Minor : 0.1.0

: 0.1.0 #Patch: 0.0.1 (default bump)

#CUSTOM_TAG

Sometimes we might need a custom tagging mechanism, using CUSTOM_TAG that is even possible. Setting this tag will invalidate any other settings.

[SKIP CI]

If any commit message in your push or the HEAD commit of your PR contains the strings [skip ci] , [ci skip] , [no ci] , [skip actions] , or [actions skip] workflows triggered on the push or pull_request events will be skipped.

DRY RUN

Turning this ON helps in testing the workflow without creating a new tag. Using this with VERBOSE helps in understanding the workflow much deeper.

DEBUG = DRY RUN + VERBOSE

Xcode 13 + Source Control

Creating Pull Request is even much easier in Xcode 13. More on this in the upcoming article.
Integrating GitHub Actions with Spinnaker
By: Nathaniel Mcauliffe
Tags: Software Engineering, Ci Cd Pipeline, Open Source, Continuous Integration, Github Actions

Integrating GitHub Actions with Spinnaker

Photo by Rudolph Arnstein on Unsplash

Last year, Expedia Group™ started a refresh of the internal CI/CD systems being used. Spinnaker was chosen for the CD part and GitHub Actions was being eyed for CI. When Actions was released for GitHub Enterprise Server, we decided to trial it as our CI tool.

Seamless Workflows

One of the unknowns identified during our evaluations was how to trigger a pipeline after a workflow had been run. When migrating to Spinnaker, we went with the GitHub trigger that would start a pipeline from a push event.

The pipeline would start a Jenkins job that would do the release and publish parts. With Actions now consuming that event, we needed another trigger. There were two more trigger types that could accomplish our goal: webhook and Pub/Sub.

For webhook, a job would make an API call to Gate to trigger the intended pipeline. This requires an API key and IP connectivity to Gate from the runner.

Pub/Sub would use an AWS SNS Topic that a job would publish a message to. Spinnaker would then pick up that message from an AWS SQS queue and trigger the pipeline. Pub/Sub requires AWS AIAM permissions to publish but no IP connectivity.

We did not want to have to worry about supplying an API key to each GitHub Org and IP connectivity may or may not be there. The default runner pool could be given a role with publish permissions, thus eliminating passing around IAM User access keys and making Pub/Sub the winner.

Developing a Solution

To stitch it all together, we needed an Action that would publish a message. Any AWS CLI Action could do that. Even an SNS Publish Action would accomplish that task. However, Spinnaker requires a specific format and requiring users to keep that format in their workflow file would not yield positive results. For anyone.

This led us to building a new Action for this task. The requirements were simple:

Construct a message based on the github context variables

context variables Accept additional parameters to include with the message

Publish the message to a specific topic

We released the Open Source code on GitHub and it is available for use here: https://github.com/marketplace/actions/spinnaker-pipeline-trigger.

Trigger Overview
Automated Unit Testing with GitHub Actions
By: Reme Le Hane
Tags: Flutter App Development, Flutter, Testing, Github Actions

Today we going to discuss the nicely simple way in which you can use GitHub’s actions to automate the unit testing for your Flutter project. This can be very handy to prevent broken code from going to production, or even just as a sanity check for the code reviews.

Let’s get started

Firstly, let’s get a look at what our result is going to look like…

name: Flutter Testing on:

workflow_dispatch:

pull_request:

branches: [main] jobs:

test:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2.3.4

- uses: subosito/flutter-action@v1.5.3

- name: Install packages

run: flutter pub get

- name: Run generator

run: flutter pub run build_runner build

- name: Run test

run: flutter test test

Now let’s dive into what is going on here.

First, we simply start off with a name and the triggers, this action will trigger for any pull-request made against the main branch as well as on “workflow_dispatch”, which is GitHub for manually.

The jobs section is where the actual work happens.

GitHub exposes Linux, Windows and macOS environments for you to run actions within, as unit tests are platform agnostic, I prefer to run these against Linux, in part is it is the “cheapest” option, while for OpenSource projects you have unlimited minutes, private projects are collectively limited to 2000 minutes per month, with time multipliers based on the platform being used, you can read up about that HERE.

The steps describe the order of flow for your action, which almost always will start with actions/checkout@v2.3.4, which is the action that checks out the code into the instance of the action.

As we are trying to test a Flutter project, we need to install flutter into the instance, for this we are calling subosito/flutter-action@v1.5.3, but default this will install the latest stable release, but you can configure this to another release or even pin it to a specific version.

Next, we start interacting with our own code, we start by running flutter pub get so that we can install all our packages into the instance.

The “Run Generator” step is an optional one for those of us who make use of code generation in our projects, something you can skip if you are not already running it locally.

Lastly, we run our tests with flutter test test , while the 2nd "test" is not required, it is actually the path reference to the test folder, something I need to define in order for some of the mocking functions to work correctly within a few of my projects.

It’s really that simple

Yes, it really is that simple, that is all you need to be able to run your automated tests using GitHub actions, how long it takes would depend on the size of your project. My smallest project which is about a handful of files takes just over a minute, one of my largest was thousands of files with just over 1k test over 12k LOC and 80% coverage took about 9 minutes.
IOTA & The Millionaire Maker
By: Owl Watch
Tags: Iota, Cryptocurrency, Technology, Future Technology, Insights

Dan S [IF] 2020.05.03.

Yeah I’ve been doing a crazy amount of work behind the scenes to queue some stuff up. A lot of doors have opened up since the Crypto Ratings Council published rating.​

Dan S [IF] 2020.05.03.

In my world they go hand in hand ​

yeh-tbh I’m waiting on one some work[eddsa; reusable address] from 1.5 to be published-some potential partners need it in order to support us.

I don’t think people really realized the significance of that announcement

Dan S [IF] 2020.05.03.

[Can you elaborate on the significance of that Rating and what it means for IOTA?]

Sure-The CRC is a group of industry leaders that came together to self govern and put a common framework around some of the legal aspects of approving digital assets on platforms. Rather than spending all this time doing it independently, they thought they could come together and combine their efforts. Saves time + money, but also shows US regulators that we as an industry are maturing and are serious about governance/regulation.

​

It was valuable for two reasons: You can’t even get on the organization’s partner platform without it -> and many other orgs outside of CRC look to that rating for guidance.

​

the second reason, as @Sissors noted, that the actual rating impacts people’s comfort engaging with a digital asset. IOTA being rated a 2 is signifcant. Bitcoin is a 1, Ethereum is a 2, Ripple is like a 3.75/4.

​

How to read the score:

​

One. A score of 1 means the Council’s analysis found that an asset has few or no characteristics consistent with treatment as a security.

​

2. A score of 5 means the Council’s analysis found that an asset has many characteristics strongly consistent with treatment as a security.
Why big tech will ultimately own e-commerce
By: Mike Angell
Tags: Ecommerce, Commerce, Big Tech, Retail, Future Technology

Consumer Impatience

Consumer impatience isn’t really a word people use very often but it is one of the most important things to understand in the ecommerce industry.

What exactly is “Consumer Impatience” you might be asking, well it’s the reason you likely choose Express shipping options or end up buying a product even though it might not be the cheapest available price.

Impatience sounds like a negative word but it’s actually the human body wanting to feel happy, it’s your mind knowing that a happy event is coming and wants it to happen now rather than later.

The first happy event in e-commerce comes from the fact people love receiving new things, a delivery driver drops off a little present that you get to open and inside is a product that makes you feel ownership and pride. This event fires off a whole bunch of chemicals in your brain and you feel happy.

You then get all the happy feelings that come afterwards like showing off a new dress to friends, being able to watch sport on your new TV and the other endless array of good feelings that can come from the things you buy.

People love to feel happy and that’s why we have the feeling of impatience.

Now that we understand what consumer impatience is and why it’s so powerful, we can look at how tech companies are developing highly optimised solutions that take consumers away from shopping with brands and shopping directly with them.